3 ms·
Could you give some examples of things which you think were mistakenly copied, and things which should've been copied but were ignored?
by TheAceOfHearts 8y ago
Could you give some examples of things which you think were mistakenly copied, and things which should've been copied but were ignored?
- MaxBarraclough 8y agoNothing like a good C++ flamewar, but we already have a fine compilation of the case against the language - https://yosefk.com/c++fqa/ https://yosefk.com/c++fqa/
- jcelerier 8y agothey focused on C++ as an object-oriented programming language (as did, to be fair, mostly everyone in the 1990s since it was The Big Thing then) without seeing where C++'s real value is, which is : - value types - RAII idiom with exceptions it's a big, coherent package, which means that you can write code so that e.g. my_type foo{whatever}; file f{"/foo/bar", "w"}; foo.do_stuff(); f.write(foo); and you can be assured that you won't have null pointers croppying left and right, much less "new" to write, your objects are always in a valid state, etc etc. Java is the opposite: the whole object model revolves around the identity of objects, and thus any function that looks like `public string whatever()` can return null, you have to do manual cleanup of your resources most of the time everytime you use a type (closing files, streams, soundcards, etc etc), versus every time you define a type in C++.