Hacker News new | ask | show | jobs
by brodie 2012 days ago
I can't tell if you're talking about legalese or programming.

Oh well. Time to go code golfing!

1 comments

Short code may seem unclear, but it does do exactly the same thing as longer code (if written correctly). It's exact opposite of natural language, where short sentences heavily rely on context and supposedly shared knowledge to beget correct understanding. And as such short sentences are prone to misinterpretation.

A program can also be seen as an awkward natural language, conveying programmer's intention to other programmers, of course. But it's a different modality of the code.

> short sentences are prone to misinterpretation

Exactly. That's why laws or contracts written by lawyers are so verbose. Think of a rent contract or a software license like GPL.

Contrast with WTFPL and similar...

Which is why I compared to legalese rather than arbitrary natural-language.

My argument would be that legalese with its strict "May" "Should"s and all that could be sufficiently similar to a (verbose) programming language.

Anecdotally, I certainly have entered "debugging" mode when trying to check if a specific clause of a contract was applicable to my situation before, rather than trying to interpret it liberally.

Of course, anecdote, and only demonstrates that the (my) brain _can_ operate "programmingly" when reading legalese, not that it does so "naturally".