7 ms·
Reading boost:: gives me shivers and flashbacks of my Diploma thesis
by roboben 4y ago
Reading boost:: gives me shivers and flashbacks of my Diploma thesis
- hesdeadjim 4y agoIf you want to see utter hell on earth, check out CGAL. Even at my peak C++ TMP days it was bad, being 10 years out of C++ completely, it’s vomit inducing.
- 77pt77 4y agoThis one: https://www.cgal.org/ https://www.cgal.org/ ?
- hesdeadjim 4y agoYea, computational geometry library. What’s unfortunate is that it’s basically the only quality implementation for some pretty niche algorithms.
- ActorNightly 4y agoI still point to wide adoption of boost:: as reason why C++ should never be used. If 4 pages of a single error message isn't enough to convince someone, nothing will.
- jcelerier 4y agowho cares about 4 pages of error message ? it's one double-click away in my IDE to go to the line in my code that has the issue whether it's one line or 500. this is an absolute non-problem. and if you don't have an IDE just ctrl-f the magic words "required from here" (with gcc) or "requested here": the last one will point to the place in your code where the issue comes from
- ActorNightly 4y agoJust because a solution to the problem exists doesn't make it not a problem in the first place.
- deleted 4y ago[deleted]
- 22SAS 4y agoMost production C++ codebases are very wary of using much boost. Two of the four places I worked at (wrote C++ at all of them), the use of boost was very minimal and only when absolutely needed. The first place where this was the rule, the only boost usage was boost.asio, at my current place boost.circular_buffer is the only thing we use.
- CuriousCosmic 4y agoThose 4 pages of errors are useful as hell though. Some languages are better at giving you just the important bits (Rust) but a lot of languages suffer from "simple errors obscuring complex problems" syndrome. C++ compile errors, particularly overloading and template errors are normally just some fairly tiny succinct errors (could not find a suitable method/type/operator) with a whole bunch of debug information attached that tells you exactly what the compiler tried and how it came to the conclusion that it could not proceed. I can take that information and work out exactly why my code is failing to compile 99% of the time but it's rather often in other languages that I get a succinct 1-3 line error that provides little to no context beyond where in the code it is. That leaves me to dig through stack overflow in the hopes that I can find someone with the same error and a similar code layout such that I can determine what is inducing the error. Don't get me wrong, C++ has a whole lot of issues which justify why things like Rust should be preferred wherever possible but the errors aren't nearly as bad as people make them out to be. I'm much more concerned with the cancer that are C & C++ arithmetic rules(https://twitter.com/hackingcpp/status/1492242039110524935 https://twitter.com/hackingcpp/status/1492242039110524935). Likewise for the numerous ways you can accidentally introduce undefined behavior when interacting with non "new C++" code (and even sometimes then as well).
- mjburgess 4y agoLikewise, HRanDoMCApitals gives me overwhelmed-bordem flashbacks to my early teens making windows GUI apps. help(int &&WhYIsThisLang **so, const auto *LaYereED, &&(f(auto h(int *)) []withBS) { auto otherLang = stopTryingToRepairC++ByMakingProgrammersAddMoreSymbolsToFixIt() return move(move(move(boost::boost::HPatienceInstance::Empty)))))));; }