Re: Euphoria's strengths

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...
jimcbrown said...
eukat said...

like access to the var table

I certainly wouldn't complain if someone came up with a patch to implement this in Euphoria.

It's just plain hard to do.

Really? Of course I'm looking at this from a purely Phix perspective, and apart from nested block scopes, I'd say this was reasonably trivial.
Unless you were expecting it to magic previously-undeclared variables out of thin air or suchlike.
If one of those pesky fatal errors can print "i = 5" to an ex.err then the runtime can clearly map values/storage addresses and variables/names. smile

In the interpreter, it's pretty trivial. Basically a few hooks and some understanding of the data structure (which gets a lot easier with memstructs blink). This has been done already for 4.1.

I also remember writing that into a version of the...umm....pre-open source version of the source I bought off of Rob (that used a similar var_id scheme to what you proposed, IIRC). So, 2.5, maybe? And some access is there already in 4.1, at least to interpreted programs.

It's more difficult to do that with translated programs. And hasn't been implemented yet. We'd need to create a symbol table similar to what we have for routine ids. Possibly multiple, in order to allow access to non-file-level vars.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu