A Blitz-like way to write commands

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

A Blitz-like way to write commands

Post by Polo »

Hi !
I wonder if it would be possible to have another way in writing commands (which would involve a big change in the compiler, I know...)
You know, for the moment, you can write commands like that :

Code: Select all

ReAllocateMemory(handle,8)
Now it would be good if we were allowed to write it also like that, with keeping the old way of course:

Code: Select all

ReAllocateMemory handle, 8
It's jsut a matter of preference, but it would be good if we could have both like Blitz ;)

I know, there are some more important stuffs to do, but this thing would be cool
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: A Blitz-like way to write commands

Post by traumatic »

NOOOOOOOOOOOOOOOOOOOOOOOO!
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Well, in Blitz, you can use that way of coding if you want, and if you don't want you use the standard one, I like quite a lot this way we have the choice how we wanna code, it's good !
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

YEEEEEEEEEEEEEEEEESSSSSSSSSSSSS !!
:wink:
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: A Blitz-like way to write commands

Post by PB »

> ReAllocateMemory ( handle, 8 )
> ReAllocateMemory handle, 8

Are you serious?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Of course !
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

You're too lazy to type 2 brackets? You need another hobby, man.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Where did I said that ?
I just say this could be a preference, and that sometime, it can be easier to read, maybe not for you.
But it seems that when we're doing suggestion here all we get is workaround or "why do you need this" things...
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

That's what I was saying...
And that's the way a language die.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Where did I said that ?

I gave two lines of code where the ONLY difference were an opening and
closing bracket, and asked if you were serious in that you'd prefer to use
the non-bracket version... and you didn't disagree.

You also said it makes it easier to read... well quite frankly coding is not
an easy thing to do, and I honestly don't think you're cut out for it if little
things like brackets and adding a number to a command (eg. Random) is
too bothersome for you. I'm not trying to be cruel here either... so I truly
apologize in advance if you take offence to any of this.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Polo wrote:But it seems that when we're doing suggestion here all we get is workaround or "why do you need this" things...
This is no suggestion, well, none to discuss at least.

PureBasic's syntax is the same since the beginning. You can't change that.
This is also no matter of personal preference. See, I like using // and /* */
instead of ; and I love the flexibility of C-like for-loops but that's just not the
way it is. PureBasic is PureBasic is PureBasic and if you want to change the
"basic rules" of PureBasic... well...

Apart from that, I personally hate this bracketless syntax. I can't even read it! ;)
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Don't worry I don't take offence of that. Those bracket are not a problem for me, but sometime when I think at Blitz I just think it was a lot better to write Flip instead of Flip() : where's the use of the bracket here ?? Purebasic is a basic language ;)
For the Random thing It's to get away from workaround but Fred seems to love that, so...
It's not that I'm lazy, but I enjoy helper stuffs. On my random topic the answer I got is to write the function myself :)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

traumatic wrote:
Polo wrote:But it seems that when we're doing suggestion here all we get is workaround or "why do you need this" things...
This is no suggestion, well, none to discuss at least.

PureBasic's syntax is the same since the beginning. You can't change that.
This is also no matter of personal preference. See, I like using // and /* */
instead of ; and I love the flexibility of C-like for-loops but that's just not the
way it is. PureBasic is PureBasic is PureBasic and if you want to change the
"basic rules" of PureBasic... well...

Apart from that, I personally hate this bracketless syntax. I can't even read it! ;)
I haven't said change, i said add another way to do it.
Locked