4 ms·
well specifically he was trashing C++ for performance sensitive systems applications. Fixing the speed of DVCS was a major goal of git. Plus you know, kernels
by ryanobjc 10y ago
well specifically he was trashing C++ for performance sensitive systems applications. Fixing the speed of DVCS was a major goal of git. Plus you know, kernels.
His better argument about C being good is that it's easier to look at a diff and know what's going on. This is because C has minimal non-local effects, where with C++ you have the ultimate in spaghetti programming: inheritance and overrides.
- pjmlp 10y agoIf he would be consequent, given his rant, he should never touch C++ and keep using C instead. > His better argument about C being good is that it's easier to look at a diff and know what's going on. Yep, https://www.cve.mitre.org/cgi-bin/cvekey.cgi?keyword=memory+corruption https://www.cve.mitre.org/cgi-bin/cvekey.cgi?keyword=memory+...
- taneq 10y agoEasiER, not always easy. With C++ you have to know about all overridden operators in scope in order to correctly read code, for starters.
- Scea91 10y agoBecause every class has overriden operators right? You are basically trying to compare bad code in C++ with great code C. Of course the C wins then.
- taneq 10y agoNo, of course not. But if any overridden operators do exist in scope then you need to know about them in order to correctly interpret an expression. Or are you saying that overriding operators is bad practice in general and should never be used? C has fewer "magic" features than C++, and so it's more often clear just by looking at some code what it does. I like C++, but only because I'm happy to only use the subset of the language which suits me, and I tend to avoid features which increase the cognitive load of reading my code.
- pjmlp 10y agoBesides being unsafe, C is one of the few mainstream languages that doesn't have any form of overloading or non-alphanumeric identifiers. I never understood why it is so had to look at a + b and see it as a.+(b). I also need to look at the documentation or source code to see if sum(a,b) does what I think it does. Python, Ruby, Smalltalk, Ada, Lisp, Scheme, C#, C++, Swift, Rust, D, Scala, Clojure, Kotlin, JavaScript(ES7), ML .... developers seem to be able to cope with it, just C, Go and Java devs not.