Re: Fallbacks in Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message
dcuny said...
Ekhnat0n said...

I will go and GOOGLE Lua and the way it implements these fallbacks

You might also have a look at Python, since it implements a similar mechanism.

The more I consider it, the more this seems to me as something that would be better implemented as a special type of sequence.

That is, if the meta flag is set, it executes the user-defined fallback (as in Python or Lua), rather than only being triggered on a failure.

That still leaves the question of how the meta information gets updated when Euphoria passes the sequence by copy, which strikes me as the real problem here.

- David

I do know a thing or two about Python already, but will have to read up on it
to refresh knowledge I acquired some odd 25 or more years ago.

As to implemnting it as a sequence: you are absolutely right
because it gives most freedom for the programmer Again for the meta-flag you hit the bulls'eye.

And now for your problem:
There will be no problem at all because EXACTLY WHILE Euphoria PASSES IT BY COPY
you can compare it to any sequence in the variable area
and find out
exactly which sequence is meant
AND what the differences are
AND correct those in the actual variable.

It is not that hard isn't it blink

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

Search



Quick Links

User menu

Not signed in.

Misc Menu