map kinds of Ranges

Mehrdad wfunction at hotmail.com
Mon May 23 22:22:09 PDT 2011


On 5/23/2011 10:08 PM, Jonathan M Davis wrote:
> On 2011-05-23 22:02, Mehrdad wrote:
>> One question: Why make the syntax complicated for just a little gain? 
>> Wouldn't it kill a lot more birds with one stone if we allow for 
>> attributes? 
> They _are_ attributes. They're just not user-defined attributes. User-defined
> attributes can still be added later. Besides, the gain is _enormous_. Without
> conditional purity, conditional nothrow, conditional @safe, etc. most generic
> functions (including a large portion of Phobos) can never be pure, nothrow,
> @safe, etc.
>
> - Jonathan M Davis
Wait, what? I never said we shouldn't include conditional stuff, I just 
said they should be with @attributes rather than keywords, because that 
would somewhat simplify the syntax (fewer keywords, although attribute 
syntax is added) and unify things.

So the question was: Why not make @pure, etc. become regular metadata? 
That way the syntax would likely turn out the same as user-defined 
attributes.


More information about the Digitalmars-d mailing list