The Thermopylae excerpt of TDPL available online

Jason House jason.james.house at gmail.com
Thu Oct 29 05:32:51 PDT 2009


Denis Koroskin Wrote:

> On Thu, 29 Oct 2009 15:12:51 +0300, Lars T. Kyllingstad  
> <public at kyllingen.nospamnet> wrote:
> 
> > I don't think he uses is(typeof(...)) in the text. The code snippets in  
> > question are marked "Note: normally the code below would not be  
> > included...", and I suppose he's put them there as a reminder for  
> > himself and Walter on what needs to be fixed before the book comes out.
> >
> > I agree with you, though, is(typeof(...)) is quite often misused, or at  
> > least used in an ugly way. Why not use __traits(compiles, ...) instead?
> >
> > -Lars
> 
> ... which is at least as ugly.

I disagree. Code that isn't readily understandable is uglier than readable code. Certainly, __traits is ugly, but it is easier to understand when readig code and easier to write.



More information about the Digitalmars-d mailing list