by nicholassmith · 13y ago · 0 comments
It's odd that he's such an accomplished engineer but every presentation I've seen him give involves saying outrageous things while starry-eyed geeks stare at him adoringly. If it weren't for the fact that he's arguing from a position of (very great) authority, he would persuade very few people of anything.
First, by delivering working code that ended by running the majority of phones and smart devices out there. Also, by revolutionizing source code control. No, he didn't invent (almost) any of the concepts behind git, and by now the majority of the code was not written by Linus. However, he was able to strike a balance between features, usability, speed and working model that DID revolutionize version control. Monotone pioneered a lot, but was too slow and cumbersome; so was Bazaar without pioneering much. BitKeeper had a lot of things going for it, but freedom and price working against it. is more or less on par with git, but it's git that brought the revolution.
Second, by being able to successfully manage more than one huge project with hundreds of contributors, all of whom he can fire at, but which he didn't actually hire (nor can he, if he needs more work).
He's loud and opinionated and one of the tech folk heroes, his opinion is going to be listened too and often parroted due to it, even if it's just his opinion rather than a technical fact.
If Linus is coding, it is probably more on his scuba diving tool than the Linux kernel.
Why is this? Because the man delivers.
Uh. Everything that can go wrong in C can go wrong in C++ by definition.
C++ also adds a lot of extra things that can go wrong which don't exist in C. There are plenty of arguments to be made for C++ over C but "so much more that can go wrong in C" is not one of them.
The C++ FQA is strongly recommended reading: http://yosefk.com/c++fqa/
That is objectively incorrect. There is much less that can go wrong with C, as there is much less period. Everything that you can do incorrectly with C, you can do incorrectly with C++, plus 10 times more things that C++ introduced. The idea that C++ is safer because "we just won't do dangerous stuff" is silly, as any language is safe if you "don't do dangerous stuff", including C.
All languages are safe if you've written perfect code, but no one is perfect, C++ does try to catch some of the lower hanging fruit problems but if you're writing hoary code you're going to blow your foot off eventually.
- use safe arrays with bound checking if you feel like to
- use automatic memory management
- pass arguments by reference and being sure they point to valid data
- use proper strings without caring if the null character is missing
C++ is only dangerous thanks to the C compatibility legacy.
Don't use C'isms and the application will be a lot safer than doing pure C coding.
You can bound-check your arrays at run-time, by wrapping them in a struct and only accessing them with functions.
There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference counting.
Even in C you are not restricted to the standard library to handle strings. C doesn't have to mean null-terminated strings. (And in C++, too, string literals give you the old-time bad strings.)
This is no longer a data type seen as a language type, but an Abstract Data Type as known in Computer Science.
You are no longer using arrays, but a data structure made by yourself.
> There's even a proper (although conservative) garbage collector for C, while C++ usually boils down to reference counting.
If you are referering to Boehm-Demers-Weiser GC, it also works in C++.
C++11 also has a GC API.
> Even in C you are not restricted to the standard library to handle strings. C doesn't have to mean null-terminated strings.
The moment you do this, you are the strange kind in town as all libraries expect C style strings as input. So it is conversion party any time you need to call those functions.
> (And in C++, too, string literals give you the old-time bad strings.)
Yeah, this is a consequence of C's compatibility that infected C++.
All of them would go away if C++ wasn't made to be C compatible.
This isn't true. C++ doesn't allow certain implicit casts that C allows (e.g., from void* to T*).