4 ms·
One thing I like about C is that it is a small language hence making it very approachable to newcomers. Other systems languages (C++ / Rust) have much longer ro
by dman 8y ago
One thing I like about C is that it is a small language hence making it very approachable to newcomers. Other systems languages (C++ / Rust) have much longer roads to being productive.
- lmm 8y agoWhat does "small language" even mean here? C has far more keywords, built in control flow constructs, and other special case builtins than, say, OCaml, so I'd argue it's actually a very large language. C's standard library is small but only because it's missing huge amounts of functionality (which might be acceptable in a language with a good dependency manager, but C doesn't have that).
- dman 8y agoHere is my (arbitrary) definition of small 1. Have a concise crisp book capturing the language 2. Give you a (false) sense of being productive in a couple of days (maybe a week) 3. Limited syntactic extensibility / metaprogrammability so that you dont run into extremely "clever" online discussions. 4. Ability to be productive without learning a new build tool / ide. 5. Ability to be productive without requiring auto completion.
- lmm 8y agoI don't see how C passes 2 (it's notorious as a language where it takes 200 lines to make a HTTP request) or 3 (it has arbitrary textual macros, so there's all sorts of "cleverness" e.g. GObject). And I'd regard 4 and 5 as false as even C-with-IDE is less productive than e.g., to return to the same example, OCaml-without-IDE.
- dman 8y agoI am willing to concede that OCaml is a small language (Having not used it, I dont have any evidence for or against). As for C, I was looking at small purely from the views of a new comer who is using a book to come upto speed with a language. You can write the programs from c books as is in a simple text editor and just compile / run them. C Books dont spend a huge amount of focus on arbitrary textual macros so in practice you do not run into macros as a newcomer.
- lmm 8y agoI'm not trying to push OCaml specifically, I'm just using it as an example of a "normal" language. I'd consider most languages (e.g. Python, TCL, Ruby, Java, Lisp, Haskell...) to be "smaller" than C; indeed the only languages I can think of that feel "bigger" are C++ and Perl.