Boost::Any ported to D
Fredrik Olsson
peylow at gmail.com
Wed Sep 27 08:06:57 PDT 2006
Oskar Linde skrev:
> Fredrik Olsson wrote:
>> Oskar Linde skrev:
>>> Fredrik Olsson wrote:
>>>> Perhaps a prefix is in order, in your example:
>> <snip>
>>> There is already a postfix: []
>>>
>>> "test"[] // Dynamic
>>> "test" // Static
>>>
>>
>> Ah, stupid of me. I like it.
>>
>> But where is this documented? I can not find any mention about it
>> under StringLiterals, and ArrayLiterals under expressions.
>
> Not very well documented, but:
>
> http://www.digitalmars.com/d/expression.html
>
> """
> SliceExpression:
> PostfixExpression [ ]
> PostfixExpression [ AssignExpression .. AssignExpression ]
> """
>
> The first form is the full slice. It seems to be missing from
>
> http://www.digitalmars.com/d/expression.html#SliceExpression
>
> though.
>
Aah, I see. Not as much an intentional postfix, as an useful side-effect
of slicing. Goot thing(tm), a small amount of highly flexible stuff, is
way better then tons of specialization.
// Fredrik Olsson
> /Oskar
More information about the Digitalmars-d-announce
mailing list