When I read Modern C++ Design, I thought that it was amazing.
But now I know that it''s just a hack. It''s a house, nay, a village, built on shaky grounds, with candy canes as supports.
As programmers of higher-level languages know, there is nothing inherently revolutionnary in Alexandrescu''s ideas. It may be very useful for some rare people, who want heavily reusable and heavily optimized components, because C++ didn''t support these features out of the box, but it''s not good programming.
If C++ 0x really provides features for doing the right-way what Alexandrescu is forcing the compiler to do, then it might be worth a second-look. Until then, I would skip on it.
Cédric
Which language to learn next...
uhm, Cedric... what the heck do you mean by that?
that it''s just a hack...
What I just seem to notice are wonderfull techniques?
Tell me, What is so bad about policy classes or object factorys?
And I think code reusuability and flexibility is something most programmers strive for? Why would you want to rewriete a Singleton everytime you want to use one?
that it''s just a hack...
What I just seem to notice are wonderfull techniques?
Tell me, What is so bad about policy classes or object factorys?
And I think code reusuability and flexibility is something most programmers strive for? Why would you want to rewriete a Singleton everytime you want to use one?
Someone above mentioned writing a compiler. Perhaps another idea is to write a virtual machine with a set of ASM style commands. Then work on parsers that can compile different languages to the byte code your virtual machine runs on.
I have started doing this as it is the next step in my project and I have used it to teach myself assembly at the same time, because the underlying theories are similar though you can get around all the different registers and stuff.
Personally I think that kind of project is more rewarding, because writing a straight C compiler will just let you build DOS programs. A scripting language lets you expand your existing and future projects and the bytecode can use concepts from any asm architecture. You are also stuck on one processor architecture with ASM, even though it is easy enough to migrate from it.
I have started doing this as it is the next step in my project and I have used it to teach myself assembly at the same time, because the underlying theories are similar though you can get around all the different registers and stuff.
Personally I think that kind of project is more rewarding, because writing a straight C compiler will just let you build DOS programs. A scripting language lets you expand your existing and future projects and the bytecode can use concepts from any asm architecture. You are also stuck on one processor architecture with ASM, even though it is easy enough to migrate from it.
quote:Original post by bilsaPerhaps I was a bit too broad. The general idea of designing for reusability, and policy-based design is a good one. It''s good that it has been brought to the C++ community. However, the way these things are done are very clumsy, as C++ clearly was not designed to do such things. Clearly, reading Alexandrescu''s book, you get the feeling that he had a lot of fun finding ways around C++''s limitations, but in a higher-level language, what he did in a few dozens of lines could have been done much more elegantly in fewer lines.
uhm, Cedric... what the heck do you mean by that?
that it''s just a hack...
What I just seem to notice are wonderfull techniques?
Tell me, What is so bad about policy classes or object factorys?
And I think code reusuability and flexibility is something most programmers strive for? Why would you want to rewriete a Singleton everytime you want to use one?
You know the saying that code should be written for humans to read, and only incidentally for computers to run? Alexandrescu''s base code is hardly readable. That''s my main problem with it.
Cédric
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement