Jason House wrote:
Andrei Alexandrescu Wrote:

It's a rough rough draft, but one for the full chapter on arrays, associative arrays, and strings.

http://erdani.com/d/thermopylae.pdf

Any feedback is welcome. Thanks!

I still think is expressions are a glaring problem. Somewhere in the text, you 
use assert(!is(typeof(... as support for what you're talking about. That 
particular construct feels more like a hack someone stumbled into than clean, 
easy to read code. It's the type of thing a programmer will get wring unless 
they use it frequently. Even you've screwed it up in past Phobos releases!  
IMHO all is(...) expressions should be revisited. Have you written the 
section(s) on them yet?

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

Reply via email to