4 ms·
"When you make a language operate closely to the metal, you can expect the syntax to be more abstruse" It's the exact opposite. Close-to-the-metal, the syntax
by fiatmoney 12y ago
"When you make a language operate closely to the metal, you can expect the syntax to be more abstruse"
It's the exact opposite. Close-to-the-metal, the syntax is actually very friendly - you've got values, and you can bash them in like a half-dozen ways. C is incredibly simple (I suppose their pointer syntax is a little janky, but one can always express it "one level at a time" via typedefs).
The really complicated parts come from making high-level operations seem "easy". There is no close-to-the-metal notion of char* vs a string, or a lvalue vs an rvalue, let alone template metaprogramming.
- banachtarski 12y agoWhat I should have said was provide high level abstractions while still allowing low level operations. There is an impedance mismatch that the language needs to address. Languages like Rust can get away with this by not allowing the most low level operations that are deemed unsafe and so have a more user friendly api. C on the other hand, makes no attempts at make the abstraction so the syntax is just small by definition.