Structural Compiler-Modernizing instead of a ton of new fea.
Posted: Fri Oct 18, 2013 6:45 am
Purebasic has made a good development lastly and a lot of progress.
However as this is the wishlist thread and not the "Praise thread", i want to express the shortcomings here.
2009 i was last time reminding that PureBasic is still
a "Stack Call based" Single-Pass Compiler. And today still this has not changed.
I believe that this is the reason, why
- i shall need declare procedures if they are "out of order"
- its still impossible to use Gosub and Return inside Procedures,
and why some people say that
- its not allowed to jump out of Loops and other constructs just with Goto.
Coming from Powerbasic (that doesn't look much alive at this time), i had always a compiler who "cared himself about this technical stuff".
And that is what a compiler is good for: Let the user think of the Algo, and care for the rest automatically.
Ok, at least a workaround can be built in.
Writing Declares should not be a part, left to the Japbe-Editor.
If the Editor can do it, take that code, built it into the compiler and write "those declares you need yourself". Let the user think of something else.
Also about leaving Loops, or Jumping out of Returns ... in PowerBasic when i leave the Procedure, the compiler destroys the stack-frame and all things are "cleaned up". No mess left.
In case of error, a "Jump out" is just practical.
Then i would like to see real B-Strings and the new H-Strings.
Under x64 i would like B-Strings and Unicode B-Strings larger then the normal 32-bit string lenght.
And thats all for today.
However as this is the wishlist thread and not the "Praise thread", i want to express the shortcomings here.
2009 i was last time reminding that PureBasic is still
a "Stack Call based" Single-Pass Compiler. And today still this has not changed.
I believe that this is the reason, why
- i shall need declare procedures if they are "out of order"
- its still impossible to use Gosub and Return inside Procedures,
and why some people say that
- its not allowed to jump out of Loops and other constructs just with Goto.
Coming from Powerbasic (that doesn't look much alive at this time), i had always a compiler who "cared himself about this technical stuff".
And that is what a compiler is good for: Let the user think of the Algo, and care for the rest automatically.
Ok, at least a workaround can be built in.
Writing Declares should not be a part, left to the Japbe-Editor.
If the Editor can do it, take that code, built it into the compiler and write "those declares you need yourself". Let the user think of something else.
Also about leaving Loops, or Jumping out of Returns ... in PowerBasic when i leave the Procedure, the compiler destroys the stack-frame and all things are "cleaned up". No mess left.
In case of error, a "Jump out" is just practical.
Then i would like to see real B-Strings and the new H-Strings.
Under x64 i would like B-Strings and Unicode B-Strings larger then the normal 32-bit string lenght.
And thats all for today.
