I want to learn C/C++, but really shouldn't

1 points by pestaa ↗ HN
As a web developer I've always been a scripting guy, and I enjoy the advantage.

However, recently I began to find C/C++ code to be beautiful with all their dangerous manual memory allocation calls, garbage collection and cryptic compilation logs. It just fascinates me, especially since I tinkered with Fossil.

But as it seems it can really make productivity suffer as higher level languages are more tailored toward the web. Please give me some advice to mute the hardcore hacker inside me.

3 comments

[ 6.4 ms ] story [ 31.1 ms ] thread
If you find yourself asking others to make your decisions for you, the correct answer is inaction, since you'd only do it halfheartedly anyway.
The problem in fact is too much enthusiasm. I wanted to hear some guidance on how to find balance in business vs technology.

Anyway, I appreciate your comment.

Use the right tool for the job. C is the right tool in a limited set of circumstances, but it's the right tool where other language choices simply don't exist. You literally cannot write what the development community would recognize as a working OS kernel, for example, in Javascript. That means that, for someone writing an OS kernel, C is infinitely* more productive than Javascript. Conversely, while you could implement a web browser that used C as a client-side scripting language, it would be a terrible idea for any number of reasons. As such you're far more productive using Javascript for the job it was designed for than if you used C.

You're trying to compare apples to oranges when you say that using C can make productivity suffer when compared to higher level languages. "Balance in business vs. technology" has nothing to do with this particular discussion when it's framed properly. Decide what you want to write and then, if a low-level language is necessary, the ? evaporates. If you can make do with a high-level language, the ? likewise evaporates because you'd be an idiot to use a tool that forces you to deal with unnecessary complexity like C does.

* for finite but extremely large values of infinite