Re: Euphoria features

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

Kat wrote:

>From: Roderick Jackson
>Subject: Re: Euphoria features
>
The part about types is just too turned around to even try to respond to.
>
>I still want goto's. And i want to be able to goto a variable's contents
>too, as if it were a form of case statement.

Can you spell spaghetti. Have you ever seen spaghetti code. Have you
ever tried to maintain code written with even moderate amounts of goto's
in it? Yeah, yeah...pipe down peanut gallery... I know you are going to
say something about programmer discipline, but nobody has ever shown
me a situation where a "general goto", that is one not strictly limited in
scope and function, is even desirable, much less necessary. The single
exception is in exit from error traps, but since we have no error or other
event traps, not even that is under discussion here. Goto's also cause
major problems in scope control. Consider a direct branch from about
four levels down in function code inside a routine in an include to some
point at the main level of the include or even outside the include or about
four levels down in some other function heirarchy in the same include.
>
>whatisthis {
>goto $1
>:apple return fruit
>:potato return vegetable
>}
>( it returns $null if $1 is not a target )

Unless I have entirely misunderstood this example, it implies instancing
or re-entering the interpreter to "execute" a variable. I call this a dynamic
or self-modifying program. This is what the data/code equivalence of
LISP does. There is enormous power and a great deal of peril in this
simple, but profound idea. It would instantly make Euphoria into an
AI(artificial intelligence) language, and allow truly non-predictable
outcomes from a programming process. Learning becomes a possible
property of a program written with this type of recursive execution.

I for one would love it, but it truly would alter the whole aspect of the
language. It would make Euphoria extremely useful for AI without
requiring it to acquire too many of the business oriented changes
(namespace still needs to be fixed and sequence handling needs to
be made symmetric). It might even appeal to the minimalist that
is responsible for this whole shebang. The only other thing that it
would probably demand would be a strengthening of the string
handling capabilities of Euphoria since a great deal of the
programming effort would be directly in handling the strings that
represent the new programs to be executed.

>Kat,
>still looking for the ideal language.

I have referred indirectly to this concept several times previously, but
there were no bites, so I dropped it. Thankyou for provoking me to
attack it again. The concept is implicit if not simply attained in any
interpreter.

Everett L.(Rett) Williams
rett at gvtc.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu