Rant: Date and Time fall short of simplicity in D
Timon Gehr
timon.gehr at gmx.ch
Fri Mar 29 07:22:43 PDT 2013
On 03/29/2013 03:20 PM, Timon Gehr wrote:
> On 03/29/2013 03:03 PM, Steven Schveighoffer wrote:
>> ...
>>
>> 3. I HATE "safe" cast conversions. If you want to make a conversion,
>> use a method/property. I don't even know why D allows overloading
>> casting. Casts are way too blunt for this.
>> ...
>
> The only conceivable reason is opCast!bool, eg. for use in if conditions.
(In case this is not clear, a conversion method cannot really do the job
satisfactorily because of the if(auto x = foo()) construct.)
More information about the Digitalmars-d
mailing list