Flag proposal

Nick Sabalausky a at a.a
Fri Jun 10 13:47:59 PDT 2011


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
news:istulq$2rjc$1 at digitalmars.com...
> On 6/10/11 2:30 PM, Jonathan M Davis wrote:
>> On 2011-06-10 09:15, Andrei Alexandrescu wrote:
>>> https://github.com/D-Programming-Language/phobos/pull/94
>>>
>>> Discuss!
>>
>> I do have to admit that as much as I hate the idea of named parameters, 
>> this
>> particular proposal certainly seems to be an argument in favor of adding 
>> them,
>> which would tend to argue against making these changes.
>
> There is general agreement (which includes myself) that a language feature 
> is nicer than Flag,

Much

> and that Flag is nicer than the current state of affairs.

Only *barely*.

> This is no surprise because a specialized language feature will _always_ 
> be better than one built from tools offered within the language. It's like 
> God vs. human.
>
> So the crucial question is whether a language change is warranted. We 
> should be much more restrained than this discussion suggests. Any and all 
> programming languages have limitations. This, coupled with the former 
> point, leads to the fact that at some point you MUST look into doing 
> within the language something that could be done nicer if you got to play 
> God. Doing the latter does not scale.
>
> So, does Flag work around a limitation in the language? Sure. Would a 
> language-changing solution work better? Absolutely. Is the necessity of 
> changing the language a foregone conclusion? I don't think so.
>

In general, I would agree with this. I completely understand the desire, and 
even the need, to avoid extra language features when reasonable to do so. I 
really do.

But the idea of using Flag over named parameters just stretches it to a 
rediculous extreme. This seriously reminds me of Sun's infamous whitepaper 
that desperately tried to rationalize Java's lack of delegates/anon-funcs 
("But you can use functors!!!" Fuck functors.) Is adding the feature of 
named parameters worthwhile in light of Flag? *YES*, *ABSOLUTELY*, 
*CLEARLY*, *DEFINITELY*, *YES*, *YES*, *YES*.





More information about the Digitalmars-d mailing list