Hacker News new | past | comments | ask | show | jobs | submit login

> the boost dependency is an immediate "oh hell no"

Can you expand on that?




Boost makes you enter header and linking hell. I'm talking "an entire day to figure out how to include that in your makefile and why the fuck doesn't it link correctly" level hell.

You can also count on having 10MB+ of libraries to distribute if you use the entire boost lib (which, let's be honest, will be the case 90% of the time because people can't bother with cherrypicking features)

And just pray that you don't need to recompile boost because you're in for a fun few hours of wasted compilation because it fails at 80% because of <cryptic boost message>


This is what I find most surprising about C++. Apparently including a single library as a dependency takes large amounts of effort. The end result seems to be that developers avoid using dependencies and resort to rewriting large amounts of code.

If you contrast this with, say, Node.js, you could simply do "npm install boost --save-dev" and "var boost = require('boost');".

Nobody seems to use C++ package managers either, and the typical reply is to use the package manager of the operating system. But since that's not platform neutral there's a lot of wasted effort of maintaining multiple instructions to install the library. And Windows instructions typically require non-trivial amount of manual work, often even setting up weird environment variables pointing to various locations.

And then you want to build for 32bit instead of 64b and there's more manual work.

I would have imagined that this would be a solved problem by now.


Hmm, granted I'm very new to boost and to C++ in general because I'm relearning it but a couple of nights ago I grabbed boost, compiled from source and tried out an asio example and it all seemed to work pretty easily. Maybe I need to get into more complex projects to see how bad it gets (which is worry-some since I'm essentially a newbie and don't want to waste my time learning something that won't be useful later (or just painful)).

> And just pray that you don't need to recompile boost because you're in for a fun few hours of wasted compilation because it fails at 80% because of <cryptic boost message>

It took my lowest spec MacBook Air about 15-20 minutes to compile from source. Does it normally take hours for you?


Of course, boost is not as hard as some grumpy oldtimers make you believe. Anyone who refuses to use the massive amounts of tested, reliable code that is boost because 'it's too hard to install', should be banned from any real-world project for severe NIH syndrome.


>grumpy oldtimers

I wish I was a grumpy oldtimer, but I'm more of a dirty youngun'.

Note that I didn't say "don't use boost". Boost is amazing and you should use it if it saves you time. It's just that initial setup may be... let's say interesting.


This... Boost will ruin your compile times. I'm addicted to instant compilation so I avoid template hell.


They were referring to compile times to build boost itself, not of their own projects. On most Linux distros, there are binaries already available so that's not a problem; yes with brew on OSX it takes a long time but you don't do it that often.

Of course template-heavy, header-only libraries will increase compile time, but not insanely so. I try to be careful about including boost's ease-of-use headers which pull in everything and keep it limited to what I really need from a given sub-project.

Most of what I use from boost is in C++11, except asio, but the same principals apply.


Bingo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: