Jul. 20th, 2009

jducoeur: (Default)
This article on Lambda the Ultimate was the first I'd heard of the new C++ concept of "Concepts". Basically, C++ is starting to recognize that its version of generic programming, while powerful, is kind of brittle, and it's remarkably easy to get remarkably confused by the bugs that arise from it.

If you read through the above-linked article, though, it kind of hurts. They're introducing a whole new idea (rather complex idea at that) that is rather parallel to interfaces, but limited to a rather precise purpose. It offends me in rather the same way that Single-Use Kitchen Gadgets offend Alton Brown. You can get nice clean, predictable compile-time behaviour from your templates, by adding new ideas of Concepts and Concept Maps that make it all twice as complex.

Bjarne Stroustrup, the god of C++, has a decent article on why the current model is over-complex, and seems to have a better handle on reality. But really, the whole thing leaves a bad taste in my mouth. I mean, yes -- I recognized long ago that C++'s days were pretty numbered. But this feels like such a hack onto the side of the language, and the rationalizations feel so tortured, that it just drives home that the language is obsolete. They're trying to shoehorn in what amounts to Scala's Trait system, but treat it as a special case so that they don't have to deal with the broader ramifications of the idea. Whereas the same functionality in Scala is far cleaner and better-integrated into the language -- it just recognizes that, once you truly go down that road, you wind up with a very different language...
jducoeur: (Default)
This article on Lambda the Ultimate was the first I'd heard of the new C++ concept of "Concepts". Basically, C++ is starting to recognize that its version of generic programming, while powerful, is kind of brittle, and it's remarkably easy to get remarkably confused by the bugs that arise from it.

If you read through the above-linked article, though, it kind of hurts. They're introducing a whole new idea (rather complex idea at that) that is rather parallel to interfaces, but limited to a rather precise purpose. It offends me in rather the same way that Single-Use Kitchen Gadgets offend Alton Brown. You can get nice clean, predictable compile-time behaviour from your templates, by adding new ideas of Concepts and Concept Maps that make it all twice as complex.

Bjarne Stroustrup, the god of C++, has a decent article on why the current model is over-complex, and seems to have a better handle on reality. But really, the whole thing leaves a bad taste in my mouth. I mean, yes -- I recognized long ago that C++'s days were pretty numbered. But this feels like such a hack onto the side of the language, and the rationalizations feel so tortured, that it just drives home that the language is obsolete. They're trying to shoehorn in what amounts to Scala's Trait system, but treat it as a special case so that they don't have to deal with the broader ramifications of the idea. Whereas the same functionality in Scala is far cleaner and better-integrated into the language -- it just recognizes that, once you truly go down that road, you wind up with a very different language...

Profile

jducoeur: (Default)
jducoeur

June 2025

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags