Re: Goto (Was Re: Open Source)
- Posted by Pete Stoner <stoner.pete at ??ail.com> Oct 24, 2007
- 777 views
Matt Lewis wrote: > > Derek Parnell wrote: > > > > Juergen Luethje wrote: > > > Matt, I agree that would be better than my proposal above. > > > BTW: I vaguely recall now, that Derek had suggested something similiar > > > some years ago, but I can't remember any details. > > > > Yes I did. > > > > <a > > href="http://www.users.bigpond.com/ddparnell/euphoria/product.htm">http://www.users.bigpond.com/ddparnell/euphoria/product.htm</a> > > > > Item #24 "Support for named loops and blocks" > > I had totally forgotten about that page. It's kinda neat to see that we've > managed to get a few of those into the code: > > 1. Namespaces (the page is light on details, but I think it's basically > the same as what's in there now) > 6. 'Length of Sequence' syntax item. > 30. User defined crash routines. > 32. 'Compile-to-P-code' option. > > And then there are those that I think are good ideas to consider: > > Matt I would suggest that that page is an excellent list of ideas that should be considered before venturing further (I've been left far behind in some of the discussions here i.e. on Namespacing). As perhaps a more basic coder I like the ones that reduce the verbosity of the code (and the 'problems' I have to cope with the most) and I feel these would be most appreciated by new users. So IMVHO the ones I think should be considered for adding first are (with some comments).. 3. Assignment on declaration - I can't see any downside to this? It removes a potentially confusing difference between constants and other variables and more importantly saves typing! 24. Named loops and blocks - I like the elegance of "exit i" but as discussed it won't work on while loops so I guess labels are the way to go and this would save all those extra flags you have to add. 4. 'Next Interation' keyword 5. 'Repeat Current Iteration' keyword 7. Scope of a 'For' loop counter to extend beyond the loop. <whispering> 21. GOTO construct. - I have no great desire for this and don't (really don't!) want to start any new disputes but just a small suggestion.. GOTO is disliked as it could branch anywhere in the code and thus become difficult to follow. How about if it was only allowed within the scope of its own proc/func? <\whispering> Regards PeteS