Re: Euphoria's strengths
- Posted by useless_ Jan 12, 2015
- 1485 views
That's true if all you need is something like variable_id()/set_variable()/get_variable(), however ...
Unless you were expecting it to magic previously-undeclared variables out of thin air or suchlike.
I believe this is the level of access that eukat is asking for (in addition to being able to explicitly de-declare previously declared variables).
One of the hoops i jump thru in Euphoria, for variables, is to use an associated list, vars.name and vars.value, and setvar("name",value) and getvar("name"). Then find() and match() etc work normally on the lists, i can search for a value or a name, and use wildcards. If the varname isn't there, i can make it, this helps a lot with inheritance. This is actually an old workaround, from October 2003. It can get cumbersome, and the first run of a program tells me where i used the transparent normal syntax of Euphoria and not the special vars list syntax. And i know i am taking a speed hit, which shouldn't happen with native support in the core. Same problem with memory use: once used it isn't ever returned to the OS. But this is an example of a feature users could load in an include file if they don't mind the syntax being different than normal Eu code.
I tried to write a interface using new reserved keywords as a scripting language running on Euphoria, it didn't work. I couldn't recieve parameters and pass them to Euphoria properly. This would have been a workaround for not having string execution in the core. Spawning new processes doesn't work either, because you cannot use the existing environment, you cannot make an include file to instanciate the variables if you don't know the varnames to write into the include file for the new instance. Having access to the varlist in Euphoria might fix the lack of string execution, if you can accept the long time to launch a new Eu app, just to run one string. But if it's run repeatedly, the startup time is a hit only once. Keeping the two environments sync'd may be an issue.
Tasks was a great workaround for event driven code. I wrote an event driven ircd and httpd in the other language, but tasks seem to work equally well for that sorta thing, if differently, in Euphoria. Tasks may be a good workaround for timers in the other language, i have not tried, i have been away from Eu for some time, partly because my code for task message passing was rejected. I quit working on that in Oct 2013, because someone else was developing it.
useless