wish lists etc - Reply

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

*** Reply to note of 01/04/97 19:03
nor do i wish to start a flame war. i agree that simplicity in a language
is an important feature.

you are correct in stating that the 'CASE' is a weaker and more limited
version of the 'IF' statement. anything you would want to do with a 'CASE',
you can do with an 'IF' - and more. it's just one of those syntactic sugar
things.

i'm hardly dead set on a "CASE" statement; nor am i compelled to turn
Euphoria into a version of "C". for some time, the use of references
such as foo[i][3][j] had been gnawing at me. for me, they are one of the
'goto' of Euphoria code - quick and dirty, but hard to read in a month.
when i ran across the 'FOR x IN y' statement in ABC, it seemed ideal for
Euphoria: it mapped well into the language, and it added clarity to the
code. i wrote the pre-processor so people (myself included) could try it
themselves, and see if the idea has merit.

i think robert craig wouldn't mind me quoting him here:

   "Once I've added a new language feature, I can never take it out.
   I have to be very cautious."

amen to that.

re: adding an 'until' statement. i'll consider it, but there is one
problem. the nice thing about the 'WITH' statement is there is a 1:1
mapping between lines of input code and lines of output code. with
a 'REPEAT', you need to turn it into something like:

   -- BEFORE                      -- AFTER
   repeat                         while 1=1 do
      ...                            ...
   until <condition>                 if <condition> then
                                        exit
                                     end if
                                  end while

which is not a 1:1 mapping. this means that i would need a cross-reference
in order to map errors back to the source code. it's not all that difficult;
i just need to decide how far i want to take the program.

i'm preparing the next release of the pre-processor that aims to remove
the "hassle" in using it. it's coded, but i want to do a more thorough
job testing it before releasing it.

-- david cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu