RE: goto

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

Cuvier Christian wrote:

[snip]

 Igor Kachan wrote:

>> Hi Jeremy,
>> 
>> In previous recent thread about 'goto', there was the example
>> with the Euphoria 'exit' operator.
>> 
>> For example, Turbo Basic 1.1 has 6 different 'exit' operators:
>> 
>> exit select
>> exit def
>> exit for
>> exit if
>> exit loop
>> exit sub
>> 
>> Quick Basic 4.5 has 5 different 'exit' operators:
>> 
>> EXIT DEF
>> EXIT DO
>> EXIT FOR
>> EXIT FUNCTION
>> EXIT SUB
>> 
>> Plus they both have 'goto', 'gosub/return', subs and functions.
>> 
>> And these *all* basic's *exits* serve for a single purpose, exactly
>> to *exclude gotos* from the program structure.
>> 
>> Euphoria has no goto, has no gosub/return, but has a single 'exit',
>> and has 'return'/'return something' in procedures, functions and types.
>> 
>> And a Euphoria programmer can do much much much much ... much more
>> than all at all Turbo Basic 1.1 and Quick Basic 4.5 programmers
>> in the World.
>> 
>> Do you *want* to learn 11 exit operators to do all you *want*
>> in these basics as a programmer?
>> 
>> Just a joke. I think there is a good sense of humor on this list.
>> 
>> Good Luck!
>> 
>> Regards,
>> Igor Kachan
>> kinz at peterlink.ru
 
> ----------------------------------------
 
> Euphoria has:
 
> end if

    same in basics

> end for

    'next' in basics

> end while

    'wend' in basics

> end function

    'end def' in basics

> end procedure

    'end sub' in basics

> end type

    perpetual as' in basics
 
> just to exit a block of code, while most languages designers understood that
> just "end;", or just a character '}', or just an indentation change, would
> be good enough for the purpose.

Yes, perpetual ';' or '}' or 'end'. Tons of ';'.

And me personally hates to see something like to:
                  
                       end;
                     end;
                   end;
                 end;
               end;
             end;
 
> Isn't this even worse? I'd say yes, because you use "exit" far less often
> than "end".


No, just more clear code.

 
> As far as the goto statement is concerned, my personal taste would be to
> have dedicated constructs taking care of its main uses. I think indeed that
> a language is made for the programer to do as litle translation as possible
> between his thought and executable, maintainable code. Euphoria can largely
> improve in this respect.

My main thought was and is: in basics,  5..6  different 'exits' are just for 
struggle with its own, basic's, 'goto'.

Strange design. I know, it is for compatibility with older versions,
but strange anyway.
And I do not want an inner war of Euphoria key words.

[snip]

Good Luck!

I'm out of town now, sorry.

Regards,
Igor Kachan
kinz at peterlink.ru

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

Search



Quick Links

User menu

Not signed in.

Misc Menu