Get constructor for a class

simendsjo simendsjo at gmail.com
Fri Sep 13 15:10:00 PDT 2013


On Friday, 13 September 2013 at 15:27:42 UTC, Namespace wrote:
> On Friday, 13 September 2013 at 15:16:36 UTC, H. S. Teoh wrote:
>> On Fri, Sep 13, 2013 at 04:16:30PM +0200, simendsjo wrote:
>>> On Friday, 13 September 2013 at 14:02:15 UTC, Gary Willoughby 
>>> wrote:
>> [...]
(...)
>>
>> The syntax for is() is one gigantic mess. It does work, but 
>> it's not
>> pretty. IIRC Walter admitted that it could do with some 
>> cleanup, but
>> it's a bit too late now since too much code relies on its 
>> quirks.
(...)

>
> We should clean up this mess in 'is' and 'traits' and 
> especially for tuples. IMO it's ok if it breaks code as long as 
> it helps to write cleaner and tough code. This will also help D 
> to gain more attention.
> There is so many crap in D... We should really start to clean 
> up as long as D2 is still a Beta.
> And we should stop to transform it into something like C++ with 
> transferring built-in features into the library (like scope or 
> delete).

D2 is in beta...?

I agree is() and __traits is quite messy, and I have quite some 
workarounds for various stuff in the combination of is() 
__traits(), alias, enum and templates - basically generic 
programming.

But I doubt many people here agree D2 is in beta and will allow 
breaking existing code in ways that changing the aforementioned 
features would do.


More information about the Digitalmars-d-learn mailing list