Why Ruby?

Simen kjaeraas simen.kjaras at gmail.com
Sun Dec 12 06:47:05 PST 2010


Lutger Blijdestijn <lutger.blijdestijn at gmail.com> wrote:

> Simen kjaeraas wrote:
>
>> Ary Borenszweig <ary at esperanto.org.ar> wrote:
>>> Code is read many more times than it is written and so it is of huge
>>> important that code is as readable as possible. Of course this is a
>>> subjective matter, but I don't understand why some people think  
>>> __traits
>>> or __gshared are ok.
>>
>> __gshared is ok. It is supposed to indicate low-level hackery and
>> unpleasant, rough edges. __traits, however, is an abomination and should
>> be shot repeatedly with something high-caliber.
>>
>
> Is std.traits not sufficient for that?

I have yet to see std.traits.compiles( some code ). There is a very nice
enhancement request in Bugzilla that __traits be replaces with a magic
namespace. meta.compiles( some code ) is heads and heels superior to
__traits( compiles, some code ). I've not checked if others of __traits'
capabilities are impossible to implement as templates.

It has also been suggested that __LINE__ and __FILE__ be stored in this
namespace, but I find that rather less likely to happen.

-- 
Simen


More information about the Digitalmars-d mailing list