4 ms·
I gave up on C++ in part because the language changes too much. I paid for lessons on it. The std:: stuff didn't exist, templates were a recent invention, and
by burfog 7y ago
I gave up on C++ in part because the language changes too much.
I paid for lessons on it. The std:: stuff didn't exist, templates were a recent invention, and people were starting to agree that putting the overload keyword everywhere was bad style. Mostly, people were just excited about // comments and cout.
I keep hearing about how C++ is supposed to be done, and it seems to change every year. I don't know what people do with the older code as it becomes unfashionable with "very strong code smell". Updating it is risky busywork, kind of like porting to Python 3, with potential for serious bugs. Leaving it in place will make developers differently unhappy.
It isn't easy getting everybody on a team to agree on what subset of C++ is OK to use. People will sneak in their must-have feature. You'd have better luck getting agreement between emacs and vi.
- ncmncm 7y agoC++ makes no pretense of ever planning to be "done". "Done" is another word for dead. Even COBOL is still evolving. Failing to keep up with evolving languages is called stagnation. Everyone is free to stagnate, but I do not advise it. You use the subset of the language supported by the compiler you have. Code using newer features is better because the new features were added for sound engineering reasons, not just to be different.
- lmm 7y agoIt's the opposite of sound engineering. Every version of C++ contains a new feature that does 11% of the proper solution because the feature in the last version only did 9% of the proper solution. Despite all that churn the language is still as far behind ML as ever.
- ncmncm 7y agoI see that you have not been keeping up.
- throwaway17_17 7y agoWhat has the parent comment not keeping up with? Was it a reference to the ‘11%’ or to C++ being ‘behind ML’? Just curious to see what your objection was.
- ncmncm 7y ago11%
- PaulDavisThe1st 7y agoIf you think C++ changes too much, you're going to love today's Java/Typescript flavor-of-the-month web UI toolkit.
- pjmlp 7y agoYes it is hard to keep up, but so it is like any other language with mainstream usage. Languages either evolve to fulfill market needs or they die. Even C17 has plenty of differences down to K&R, not counting all the compiler specific extensions.
- clarry 7y agoC has changed much less over the years. Arguably C89 was the most important change, C99 brought a bunch of small quality of life improvements (which you might or might not need, arguably the most important are stdint and snprintf), C11 got us a threading model, C17 is a bugfix.. After C89, no new version of the standard really changed the way you write idiomatic C without code smells.
- pjmlp 7y agoFact is it did change, it even introduced breaking changes, like gets() and Annex K removal on C11. And you are missing the compiler extensions that I also mentioned. It did not change even more, because nowadays C is left for UNIX clones and embedded development, having been superseded by other languages on most corporations, even its major compilers have been rewritten in C++.
- throwaway17_17 7y agoI don’t know if parent is ‘missing the compiler extensions [you] mentioned’ or is just not addressing them. But I will take a stab: compiler extensions may be neat/effective/revolutionary, but they are unequivocally not a part of a programming language. That is why they are compiler specific extensions. I could code a compiler extension for LLVM that is a conservative, generational garbage collector and have the extension flag be —-no-more-manual-memory, but no one is then going to say that because that extension exist C++ is a garbage collected language. tl;dr -> compiler extensions are by definition not part of a language, no matter how useful, and therefore do not count towards the argument.
- 7y ago
- de_watcher 7y agoC++ changes too much??? It's the weirdest thing I've read today.
- burfog 7y agoPerhaps I can give you something weirder to read. The other big complaint I have about C++ is that it is too high-level. It isn't very good for low-level control. :-) Writing start-up code and linker scripts to support C++ code running without the libraries is not easy. All sorts of things, such as tables of constructors, need a solution. Typically that would involve a lot of assembly code. I'd need to disable lots of C++ functionality unless I wanted to write complicated things like a stack unwinder for exceptions. It's just easier to use plain old C. The result is smaller too, which is important.
- inetknght 7y agoAnd someone said I was trolling hahaha
- burfog 7y agoIt's weird feeling surrounded by web programmers who think Python and Javascript are the lowest you'd ever want to go. C++ is annoyingly high-level if you are trying to write code to go in a flash chip. The code starts running at a specific address at soon as the CPU starts. There is no OS unless your code implements one. There is no C++ library unless you port one.
- inetknght 7y agoThat's a fair point and it's a project I'd like to tackle someday in spare or paid time. I don't think C++ is annoyingly high-level in that case: just annoyingly lacking in the ecosystem to support it.