A few simple syntactic proposals

Robert Fraser fraserofthenight at gmail.com
Thu Apr 17 01:15:47 PDT 2008


Scott S. McCoy wrote:
> On Wed, 2008-04-16 at 22:01 -0400, Jason House wrote:
>>> Remove the implicit "length" inside slice brackets as it conflicts
>> with
>>> outer length. Allow only $.
> 
> The conflict is irrelevant.  I vote +1 for ditching "length" as a
> magical keyword inside a slice index.
> 
> Although I still wish we had [..], [0..] [..N]... :-)

That's a really good idea, and I haven't seen that posted before. I'll 
suggest that one too unless there's any objection. If a lower expression 
is omitted, it will automatically be converted to "0" and if an upper 
expression is missing it will automatically be converted to "$". Might 
be a little easier to make mistakes with, though.



More information about the Digitalmars-d mailing list