6 ms·
I thought this was a good point: > Don't do this: http://archive.md/2014.04.28-125041/http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/desi
by tomohawk 6y ago
I thought this was a good point:
> Don't do this: http://archive.md/2014.04.28-125041/http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/design.html http://archive.md/2014.04.28-125041/http://www.boost.org/doc...
Maybe he is looking to use golang?
- amelius 6y agoThat's actually a very good example of what's wrong with C++'s templates and also shows how we got there.
- arcticbull 6y agoThat entire writeup is a scathing indictment of C++'s template system. It just gets progressively more horrifying and less understandable the further you read, until you're left with a mess of angle brackets, scope resolution operators and a pounding headache.
- northwindfoo 6y agoI think it goes to show that the combination of C++ giving the developer a lot of flexibility in how to approach a problem, as well as being unopinionated, leaves room for stuff like this to be built. There are a lot of decent ways to use templates; that link is definitely not one of them.
- amelius 6y agoTrue. It must be said, however, that the Boost libraries are built using a peer-review system. So this is not some "random" C++ code.
- eps 6y agoIt's a peer review in an echo chamber. What Boost project churns out is absolutely terrifying in its lack of rudimentary elegance and good programming taste.
- northwindfoo 6y agoI think that about sums up my experience with boost. I've found boost to be hit and miss in terms of elegance. One of the things I've liked about the standards track is how they've cleaned up many of the same boost concepts that ultimately ended up in std.
- gumby 6y agoAll of that is so that most user code doesn’t have to worry about corner cases. Libraries (of all languages) are full of weird stuff so that users can blithely use them without thinking about it.
- arcticbull 6y agoAgreed, but it should be possible to read and understand. This is solidly neither.
- gumby 6y agoThe sources to glibc are no clearer, for the same reasons.
- billfruit 6y agoI should say, after a quick glance most of the stuff is only adding greater typefullness and type saftey, which IMHO is good thing, considering the total type anarchy found in most large c projects. When some projects/domains even now prefer C to C++, aren't they trading off safety for vague expectation of greater execution speed?
- jcelerier 6y agoSo, how would you write it instead ?