3 ms·
Personally, I don't think "readable by people that don't know the language" is a reasonable feature to optimize a language around. And if you go on that direct
by marcosdumay 4y ago
Personally, I don't think "readable by people that don't know the language" is a reasonable feature to optimize a language around.
And if you go on that direction, almost the everything on the language is a larger roadblock than an oddly placed conditional.
- dlkf 4y agoI never suggested we ”optimize the language around this feature.” I only suggested that it is a higher virtue than some user on HN’s subjective concept of ”elegance.” What do you think is more important: the speed at which C programmers can navigate your code base, or one person’s subjective idea of ”elegance”?
- marcosdumay 4y ago"Elegance" can mean many things, some irrelevant, some very important. But the speed at which C programmers can navigate some non-C code is absolutely irrelevant. Specifically about Ruby, with it's infinite levels of metaprograming and "you can even redefine the meaning of blank space" philosophy, it's not 'unless' that will stop anybody.
- deleted 4y ago[deleted]
- afandian 4y agoI wrote Ruby for years (for fun). I always had to stop and think twice about 'unless' and translate it into 'if not'.
- qubitcoder 4y agoExactly the same here. I write Ruby for a living and use 'unless' where it makes sense or fits with existing code. That said, when reading code, I often have to pause and mentally translate "unless" to "if not". This is especially true for more complex logic. Elegant, yes. Additional mental overhead at times, certainly.