Re: Last minute Beta suggestions
- Posted by DerekParnell (admin) Feb 02, 2010
- 1228 views
Or maybe ? could be made to be a little more intelligent. But in any case, I think this idea can wait for 4.1.
- it would be very convenient for developing programs
- it would make introducing Euphoria to newcomers much easier
- it would make example and tutorial programs simple
loop until
The syntax for loop until breaks the Euphoria pattern.
currently:
loop do a = a*2 x = x-1 until x < 0
Could this be at least allowed as an "alternative" syntax?
loop do a = a*2 x = x-1 until x < 0 end loop
The "end" keyword is fundamental to current Euphoria syntax. In the documentation we now have to explain (apologize) that this has a "distinctive form."
For example, it is generally clear that scope for a syntax element finishes at the "end" keyword. In "loop do" this no longer applies.
It would be best if the patterns of syntax now in Euphoria are maintained.
I agree that loop is an exception, but making the 'end loop' optional would also be an exception. To be consistent, 'end loop' should be mandatory, but then it makes the construct a bit unwieldy.
I've changed my local copy of Euphoria to allow 'end loop' to be optional and it is not a large change (7 lines of code) so if we agree, it can be added immediately.