Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If you have to take the time to learn how to read something, it's not easily readable.

I don't think that's completely true. If you're used to algol or C-style, Lisps tend to be hard to read. Concatenative languages even more so. Not necessarily because they're hard to read in and of themselves, but because the "shape" of the code is "all wrong" compared what you're used to, and your usual anchors (keywords, binary operators, infix assingment, ...) are nowhere to be found.

I mean Arabic or Korean are not necessarily harder to read than English, but you've got to know them and how they work before you even recognize patterns in the squiggly lines and little squares.



Not really; Lisp is hard to read because the syntax is unusual, but it's not hard to understand because it's complicated. On the contrary, it has the most consistent syntax of any language.

They author's point is that Coffeescript is hard to read because it has too many edge cases which are not easily understood under a smalla and consistent set of rules. I have not programmed with CS, but it sounds like a convincing argument.


Or, to restate this and amplify it a bit, Lisp syntax is hard to read because most people are unfamiliar with it. This isn't -- or should not be -- a problem if you need to learn to read a language in order to use it. (This is orthogonal to whether you want to learn it in the first place, or whether you "ought" to.) It is a problem if learning how to read and write the language isn't enough.

The point TFA raises is that people who're familiar with CoffeeScript syntax may still make mistakes resulting in completely erroneous but valid code. Yikes. And the inherent nature of whitespace or indentation makes the problem harder to detect by cursory inspection.

I have no strong opinions about CoffeeScript, myself. I just thought this was an interesting distinction, and a rare case where syntax makes a significant difference.


Mere consistency is not enough. List is hard to read because humans do not have a natural feel for how deep a set of nested brackets are, and you have to be able to spot the matching open-bracket to understand the code.


Again, it's hard to read if you are not familiar with it. Even as someone relatively new to Lisp, indentation and formatting makes a world of difference for readability.

This isn't specific to Lisp, either. I posit that if you took your average C-like and removed indentation from any reasonably sized function or method (one or more loops, one or more if/else), you would have a hard time counting brackets.


I agree that consistency is necessary but not sufficient, though, which is what I think you're getting at. Most of the time, though, consistency is clearly better than inconsistency. There's less to remember or, if you prefer, less to screw up. :)


Please note that I was not replying to TFA, I was replying to smacktoward's assertion that if you need to learn how to read a language it's not easily readable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: