"with" still sucks + removing features + adding features

Max Samukha outer at space.com
Tue May 19 02:05:53 PDT 2009


On Tue, 19 May 2009 18:23:25 +1000, Derek Parnell <derek at psych.ward>
wrote:

>On Mon, 18 May 2009 21:30:41 -0700, Bill Baxter wrote:
>
>> On Mon, May 18, 2009 at 9:17 PM, Derek Parnell <derek at psych.ward> wrote:
>>> On Mon, 18 May 2009 23:02:37 -0500, Andrei Alexandrescu wrote:
>>>
>>>> Derek Parnell wrote:
>>>>> On Mon, 18 May 2009 21:47:01 -0500, Andrei Alexandrescu wrote:
>>>>>
>>>>>> Derek Parnell wrote:
>>>>>>> On Mon, 18 May 2009 19:31:23 -0500, Andrei Alexandrescu wrote:
>>>>>>>
>>>>>>>> I completely disagree that that's a special case. ".." is punctuation.
>>>>>>>> You can't pretend punctuation has the same meaning everywhere in a
>>>>>>>> programming language.
>>>>>>> I'm a bit confused. Are you saying that one must expect that the meaning of
>>>>>>> punctuation in a programming language depends on the context the
>>>>>>> punctuation is found in?
>>>>>> How many meanings does '[' have in your favorite programming language?
>>>>>
>>>>> One.
>>>>
>>>> No.
>>>
>>> But you never asked for the name of my favourite language?
>> 
>> Does it have string or character literals?  Then there's probably at
>> least two meanings.  ;-P
>
>Huh? "two meanings" of '['   ... is that what you are saying?
>
>Ok, the language has both string literals and character literals, so how
>does that imply that '[' has two meanings?

In D, [ has at least four meanings:

auto a = [1, 2, 3]; - array initializer
a[1] - indexing operator
a[c..d] - slicing operator 
int[10] - static array declarator

C++ has [] for lambdas (no! C++ should be banned by the international
law, if there is any)



More information about the Digitalmars-d mailing list