4 ms·
No, you’re making an incorrect extrapolation. Obviously there’s a minimum number of features for readability. Example: dictionaries use a core of a few thousand
by ashelmire 8y ago
No, you’re making an incorrect extrapolation. Obviously there’s a minimum number of features for readability. Example: dictionaries use a core of a few thousand words. Yes, they could use less or more, but it’s an optimization. Obviously a language that doesn’t allow sufficient expression isn’t easy to use either. But still, the more rules, the more you have to learn and that means harder to read in that respect.
- magicalhippo 8y agoI disagree. Consider a language which has float types, but which also allows you to declare vectors floats. However in v1 of the language, you can only initialize them and operate on their elements. So if you want to add two vectors, you'll have to write a function vector_add() which does the element-wise addition. Then v2 comes along and adds addition, subtraction and scalar multiplication of vectors as a new feature, using the normal operators. Suddenly your code can now read like the math it represents. You've added a language feature, but it makes it easier to read since there is less useless clutter and the code matches the original math more closely. And it's actually less to learn since you don't need to know if the vector library you had used vector_add or vectorAdd etc, you re-use the same operators as for scalar types, just as regular math does.
- magicalhippo 8y agoThe point I was trying to make with the Brainfuck comparison is that Brainfuck is about as simple as they come, and as such actually very easy to read as such (replace the actual symbols with whatever you like). It's just very difficult to comprehend what the code actually does. Writing complex programs in Brainfuck means you need to piece together constructs, and due to the simplicity of Brainfuck, these constructs can be large. As such it's actually very difficult for non-expert Brainfuck coders to recognize say a for-loop. In higher order languages that have explicit for-loops in them, you still need to know what they are and what they do, but I argue they're easier to remember, read and reason about. As such the extra feature (a for-loop language construct) can make the language easier to read.