Flag proposal

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Jun 10 13:21:59 PDT 2011


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, and that Flag is nicer than the current 
state of affairs. 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.


Andrei


More information about the Digitalmars-d mailing list