Hacker News new | ask | show | jobs
by tokenrove 3671 days ago
To answer the titular question: I hate C++ because I worked in it for 10 years, and I came to realize things could be otherwise.

I almost came back to the language with C++11, but its core problem remains the same: the only maintainable codebases seem to be those strictly ruled over by language experts with an iron fist -- and too many people think they're experts (hint: if you haven't read the language standards (or written them!) and hacked on a compiler or two, you probably aren't an expert).

You inevitably have to choose an opinionated subset of C++, which often results in a language which is more on par with many modern languages, but with more pitfalls and traps, and which you have to teach to every person you bring on board.

And let's not even start on compile times and other problems C++'s legacy brings with it.

FWIW, I still do a lot of C and assembly. Modern C is pretty nice, although it will be nice to see a newer systems language finally take over.

You will probably end up doing C++ professionally, and that's fine, but for your own sake and the sake of your coworkers, learn some other languages that will broaden your mind.

You can find many suggestions in this thread, and I could go on about the more mind-broadening ones (logic programming, dependent types, metaprogramming, etc), but the most valuable might be another systems language, even if it's not popular, just so you can see how things could be otherwise. I think reasonable candidates might include Ada, Modula-3, Rust, D (which is a little too close to C++), BLISS if you can track down a compiler, Forth; maybe even Common Lisp.

1 comments

I thought BLISS was just a macro language. Why do you count it as a systems language?
https://en.wikipedia.org/wiki/BLISS

It included a macro facility, but it was also a full-blown systems programming language.

I'll be darned. Whole time I've seen it in VMS-related material I thought it was just a pre-processor for ASM or something. Turns out it was a sort if C competitor. Thanks for the tip. :)
No problem. I'm trying to remember when I first learned about it. I want to say it was a compilers (?) course in grad school. The professor was lamenting that C had survived and BLISS had disappeared, led me to research it originally. I particularly like that everything (or nearly everything) is an expression, probably due to my affinity for functional programming languages. Beyond that, I'm not sure that I like it's typeless nature for doing systems programming work. I guess it depends on how low-level you're talking about, though.

EDIT: I recall reading more about BLISS back then, but that was a decade ago. This [0], linked in the Wikipedia article, is pretty interesting. I'm about 5 pages in and have to head out so I'll finish it later, but it seems like something you'd be interested in given your general interest in language history (from reading your posts in the past).

[0] http://www.cs.tufts.edu/~nr/cs257/archive/ronald-brender/bli...