ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> language-dev
language-dev
Re: Iterator Syntax
by Mathieu Bouchard other posts by this author
May 3 2002 7:40PM messages near this date
Re: Iterator Syntax | Re: Iterator Syntax
On Fri, 3 May 2002, Glen Starchman wrote:
>  I am working on my language again after a long haitus and have a question for 
>  the group in regards to readability of my iterator functionality. Currently, 
>  I am looking at 3 different forms:
>  1.
>  "hello".each() 
>  	{ |x|
>  		print (x)
>  	}
>  I am rather fond of number 3, but am uncertain as to which is the most 
>  readable for maintainers and intuitive for the developer. 

Number one is Ruby syntax (except that this formatting is not allowed).
Number three has the problem that you have to write || for argumentless
blocks, which is a problem if you have a || operator as well, because your
||'s are not right after a {.

But in any case all this looks very Rubyish, so I wonder why you want to
create a new language. What elements will be unique to your language?

________________________________________________________________
Mathieu Bouchard                   http://hostname.2y.net/~matju
Thread:
Glen Starchman
Donal K. Fellows
Glen Starchman
Pixel
Glen Starchman
Buggs
Mathieu Bouchard
Buggs
Mathieu Bouchard
Glen Starchman

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved