Re: Euphoria features

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

Ralf wrote:

> Lucius, goto's _are_ effective ..

I'm not a big fan of GOTOs, but they are quite effective for exiting nested
blocks of logic.

Yes, I know that you *could* move those blocks into a routine, and use
'return' to jump out of the routine. And I also know that there are
structured ways of writing code that avoid GOTOs - my eBasic translator can
cleverly re-write GOTOs into structured code, resulting in functionally
equivalent but entirely unreadable code.

Restricting the GOTO to only forward jumps might be a reasonable constraint.
I'm not sure I'm ready for named GOTOs, like:

        goto $foo

You can already do that by setting up vectors through routine_id:

        call_proc( foo, {} )

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu