2 ms·
In theory I agree with this, but in practice it is a bit harder in my experience. To make readable code, it might help if the language itself is readable. But m
by tluyben2 11y ago
In theory I agree with this, but in practice it is a bit harder in my experience. To make readable code, it might help if the language itself is readable. But more importantly, the programmer has to write readable code. And that is a skill which takes a lot of time to learn (a lot of people never do) and when they don't, I'm not sure if a readable language matters much at all.
Anecdotal, I know, but I see/saw plenty of code written by juniors and/or sweatshops (seniors from sweatshops have a tendency to not progress much in their code writing skills over the years) written in Java, PHP, Python or Ruby which is completely unreadable. And, on the other hand, code written in C, assembly or Forth that is very easy to read even though the languages themselves don't really support traditional 'readable' code.
Reading in a natural language is only very little about syntax or strict semantic rules; plenty of novels which are syntactically correct and which follow the semantics of the language but which are 'readable' as per the definition of 'able to read and understand' however which not many people would ever read or finish if they did start.
Very terse code which is well written can be beautiful and easy to read; it takes very long to craft code like that in any language but once done, to me at least, it is easy to read and often preferred over reading 'the tech spec' (for which 'shorter is better' is a rule of mine anyway).