February 23, 2004
Antti Sykäri wrote:

>In article <opr3ngqey5deu3pf@news.digitalmars.com>, Derek Parnell wrote:
>  
>
>>On Fri, 20 Feb 2004 10:56:38 +1100 (02/20/04 10:56:38)
>>, Matthew <matthew.hat@stlsoft.dot.org> wrote:
>>
>>    
>>
>>>What about a new keyword, 'last'?
>>>      
>>>
>>The issue I have with using things that look like identifiers (a.k.a. keywords) is that it takes away yet another 'word' away from our identifer namespace.
>>    
>>
>
>This is quite true. Something more context-sensitive would be definitely
>better, so that the word "last" wouldn't have to be sacrificed for mere
>array indexing.
>
>C# has some kind of context-sensitive keywords if I recall correctly.
>
>One alternative would be to extend the scope of identifier lookup, so
>that something[0 .. last] would actually mean the same thing as
>something[0 .. something.last]. Disclaimer: this one doesn't sound that
>straightforward to define and implement. And it could result in
>maintenance and readibility problems. Maybe. But it would be intriguing
>indeed.
>
>-Antti
>  
>
I think

something[0 .. ] 

is better.


-- 
-Anderson http://badmama.com.au/~anderson/
February 23, 2004
On Mon, 23 Feb 2004 15:19:20 +0800 (02/23/04 18:19:20)
, J Anderson <REMOVEanderson@badmama.com.au> wrote:

> Antti Sykäri wrote:
>
>> In article <opr3ngqey5deu3pf@news.digitalmars.com>, Derek Parnell wrote:
>>
>>> On Fri, 20 Feb 2004 10:56:38 +1100 (02/20/04 10:56:38)
>>> , Matthew <matthew.hat@stlsoft.dot.org> wrote:
>>>
>>>
>>>> What about a new keyword, 'last'?
>>>>

[snip]

> I think
>
> something[0 .. ] is better.
>

I'm sorry, did you omit something here or not. Who'd ever know what you were intending?

In this context, an omitted expression might lead to more problems than it would solve, IMHO.

-- 
Derek
July 22, 2004
"Antti Sykäri" <jsykari@gamma.hut.fi> wrote in message news:slrnc3iiqc.rqi.jsykari@pulu.hut.fi...
> C# has some kind of context-sensitive keywords if I recall correctly.

Context sensitive keywords would impair separating the lexing pass from the syntactic pass. While tempting, I think this would be a poor choice for the future. It also smacks of a kludge.


1 2 3 4 5 6
Next ›   Last »