4 ms·
> With C I would have to either depend on a 3rd party library I can never quite get past this one. There seems to be this fantasy that you can write your code
by sramsay 13y ago
> With C I would have to either depend on a 3rd party library
I can never quite get past this one. There seems to be this fantasy that you can write your code without any kind of dependencies whatsoever, and that the user can just drop it into their environment and have it work. Here's what ZeroMQ says about how to install their software:
1. Make sure that libtool, autoconf, automake are installed.
2. Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
3. Unpack the .tar.gz source archive.
4. Run ./configure, followed by make.
5. To install ØMQ system-wide run sudo make install.
6. On Linux, run sudo ldconfig after installing ØMQ.
How is depending on the presence of a massive build system, a set of file system utilities, and a compression utility different from depending on a "3rd party" library that contains an implementation of an RB tree?
- jessaustin 13y agoHow is depending on the presence of... a compression utility different from depending on a "3rd party" library that contains an implementation of an RB tree? The other nits are fair, but this one is not. You mean gzip and tar? Even in whatever hell has banned these tools, it is possible to develop in both C and C++. Downloads just take longer.
- asveikau 13y agoOK, so you need some stuff to build. The point is the runtime dependencies are small. It also requires a compiler to build. Where's your rant about that? (I keep promising myself to stop reading HN threads about C and C++ due to so much inanity. Looks like I caved.)
- sramsay 13y ago> The point is the runtime dependencies are small. Is that the point? Because that makes absolutely no sense to me at all in a world of modern linkers, shared libraries, etc. My assumption is that the OP was concerned about reducing the user's dependency list. And on that score, yes: I could have added a compiler to my list.
- asveikau 13y agoIf "the user" is compiling code then yes, that is a dependency for them or their package manager/ports system to track. However many times the user installs a binary and never needs the source. The other thing, I think this highlights one difference between C programmers and others, and maybe explains our disagreement. People coding in C often care a lot about the object code. It's not all that uncommon to look at the assembly and question what your compiled has done and make tweaks to get the binary looking better. Hence the disconnect between me saying runtime dependencies are the most important thing and you saying you don't want to install autotools to build. To me the latter complaint comes from a completely different planet.
- sramsay 13y agoI think you're making it too complex (or else I am). I think the OP is making a kind of "batteries included" argument (a la Python) -- that is to say, "it's better when the language has everything built in, as opposed to farming things off to external, 3rd party libraries." All's I'm saying is that that seems to me pretty silly. It can't be about reducing the user's burden, because you're going to burden the user anyway with all kinds of toolchain dependencies. It can't be about the runtime, because the user will, except in rare circumstances, hardly notice; if they have autotools, they have glib. I can think of million reasons not to use C. But, "Well, I don't know. I'd have to use a third party library. . ." Really?
- astrodust 13y agoA lot of third party libraries are just header files you can put into your application directly. How is this even worth complaining about?