[Gambas-user] Gambas IDE and JavaScript?
Benoit Minisini
benoit.minisini at gambas-basic.org
Sat Feb 25 13:48:21 CET 2023
Le 25/02/2023 à 13:44, Benoit Minisini a écrit :
>
> The question of "using javascript instead of Basic" has different meaning.
--> meanings
>
> If you mean using the javascript language instead of Gambas, the answer
> is obviously: no it's impossible by definition.
>
> If you mean using a "javascript-like" syntax instead of a "BASIC-like"
> syntax, it's theoritically possible.
>
> It needs defining this "javascript-like" syntax, and write a new
---> writing
> compiler (or extend the current one).
>
> But, as the reality of a language is not its syntax but what it actually
> does at runtime, this "javascript-like" syntax cannot be equivalent to
> "javascript" - different classes and functions - and some new features
> should be implemented in the interpreter.
>
> For example, there is no closures in Gambas. If you want closures in the
> "javascript-like" syntax, you have to add support for that in the
> interpreter.
>
> As a summary: no, Gambas will never be extended to other languages, but
> it can be extended to other syntaxes.
>
> Regards,
>
I imagine a new type of source file, or we can use a special comment at
the beginning of a file, so that the compiler and the IDE can make the
distinction between Gambas syntax and "javascript-like" syntax.
--
Benoît Minisini.
More information about the User
mailing list