11-09-2011, 11:26 PM
Hmmm. It seems my answer got lost... :?:
Currently it's almost impossible to extend the language that way, but it might be in the future. By enforcing FREEBASIC compatibility I lost VBScript compatibility (somewhat). In VB you can define subs and call them with IDENTIFIER PARAM1, PARAM2 ... (with no parenthesis).
This way you can declare a subrutine like:
And later call it with
But other than cosmetic syntax, it's exactly the same you have already. In fact this is a classic (static) compiler, like C, BASIC, C++, etc...
So the compiler is not ready for this. I'm not sure whether this will be really useful. The power of C/C++ IMHO resides in their library. C cannot be extended without changing the compiler... though this seems to be changing nowadays.
Currently it's almost impossible to extend the language that way, but it might be in the future. By enforcing FREEBASIC compatibility I lost VBScript compatibility (somewhat). In VB you can define subs and call them with IDENTIFIER PARAM1, PARAM2 ... (with no parenthesis).
This way you can declare a subrutine like:
Code:
SUB MICROPAINT(Param1, param2...)
...
END SUB
Code:
MICROPAINT Param1, Param2... : REM No parenthesis needed
But other than cosmetic syntax, it's exactly the same you have already. In fact this is a classic (static) compiler, like C, BASIC, C++, etc...
So the compiler is not ready for this. I'm not sure whether this will be really useful. The power of C/C++ IMHO resides in their library. C cannot be extended without changing the compiler... though this seems to be changing nowadays.