6

The "Verbally Readable !== Quicker Comprehension" argument on http://ryanflorence.com/2011/case-against-coffeescript/ is really potent and interesting. I and I'm sure others would be very interested in evidence arguing against this. There's clear evidence for this and I believe it. People naturally think in images, not words, so we should be designing languages that aren't similar to human language like English, French, whatever.

Being "readable" is quicker comprehension. Most articles on Wikipedia are not readable as they are long, boring, dry, sluggish and very very wordy. Because Wikipedia documents a ton of info, it is not especially helpful when compared to sites with more practical, useful and relevant info. Languages like Python and CoffeScript are "verbally readable" in that they are closer to English syntax. Having programmed firstly and mainly in Python, I'm not so sure this is really a good thing.

The second interesting argument is that CoffeeScript is an intermediator, a step between two ends, which may increase the chance of bugs.

While CoffeeScript has other practical benefits, this question specifically requests evidence showing support for the counter-case of language "readability"

user16764
  • 3,583
  • 1
  • 25
  • 22
  • 8
    As a Python developer I feel insulted by you using CoffeeScript and Python in the same sentence :p – ThiefMaster Oct 06 '12 at 09:57
  • Dropbox's response to that article (TLDR: they looked at it, thought about it and went with CoffeeScript anyway): https://tech.dropbox.com/?p=361 – user16764 Oct 06 '12 at 16:32
  • On the subject of comprehension: what exactly is your question? – Peter Taylor Oct 06 '12 at 19:53
  • 1
    As a JavaScript developer I'm just offended by the existence of CoffeeScript. Also, I don't see how Python more closely resembles English than any other language aside from the logical operators which seem kind of sensible to me. I thought the like-English thing was supposed to be VB's schtick. – Erik Reppen Oct 12 '12 at 01:10
  • As a CoffeeScript developer, I find JavaScript tedious as hell. It has nothing to do with if I can use "and" instead of "&&". It's more about things like "class" and "=>". – Tim Feb 06 '16 at 18:54

5 Answers5

4

I think the Article has a point as far as JavaScript vs. CoffeScript is concerned.

I personally find JavaScript quite readable and I just do not see the point of sticking another layer of syntax on top.

I have similar experiences with Java/Groovy, Groovy is just great: highly expressive, cuts out a lot of useless tedious typing compared with Java, the "extras" like native SQL support are really worth having. BUT the last time I used it debugging was painful, you end up stepping through endless obscure internal Groovy classes before you get back to your own code.

Python on the other hand is a complete self supporting environment, it is it's own language and is not tacked on top of another language (although Python itself is written in C and has excellent integration with anything written in C or C++). It has its own debugger so for the most part you are debugging the python code you wrote.

The designers of Python obsess over the expressiveness of the language and consistency of syntax. Once you get the hang of it it is very readable. You genuinely write much less code in Python compared with using other languages to solve the same problem, and, well written Python code is clear and unambiguous.

The only downsides are that in common with most dynamic languages it does not play well with IDEs, and, all that lovely high level expressiveness is not interpreted into a lean mean execution.

James Anderson
  • 18,049
  • 1
  • 42
  • 72
  • 5
    "Python itself is written in C" - techically CPython is only one implementation, and there are more (like IronPython for .NET). There's also PyPy. – Kos Oct 06 '12 at 09:40
  • The point of CoffeeScript is not primarily to make JavaScript more readable, but to remove the boilerplate (which has increased readability as a side effect). – tdammers Oct 06 '12 at 10:07
  • 1
    “Once you get the hang of it it is very readable.” — But only once you get the hang of it. The same applies to Perl, but getting the hang of it is a steep initial investment. No wonder, therefore, that newbies gravitate toward something like PHP which seems *on the surface* easier to “get the hang of”. – Timwi Oct 07 '12 at 06:29
  • 1
    If you know JavaScript, JavaScript can be used to eliminate boilerplate in JavaScript. – Erik Reppen Oct 12 '12 at 01:18
  • _"Debugging Groovy is painful, you end up stepping through endless obscure internal Groovy classes before you get back to your own code."_ That's the breaks when using dynamically-typed languages on the JVM. – Vorg van Geir Apr 03 '13 at 14:43
2

People naturally think in images

The author of that article shouldn't speak for everyone. Some people naturally think in images, others are more verbal/symbolic. Besides, his examples are of verbal versus symbolic. Neither && nor and is a picture; both are symbolic rather than pictorial, and both are processed by the same side of the brain. Symbolic reasoning is much closer to verbal reasoning than it is to spatial reasoning.

I for one am not a big fan of pictorial programming. It doesn't communicate to me. I never did like flow charts. I absolutely loathe UML diagrams as they inevitably bring out the worst in both worlds. Pictures make nice cartoons, great for presenting ideas to management. They're not so good for doing meaningful work in programming, mathematics, or physics (all of which are largely symbolic).

Sometimes pictures just don't cut it. Symbols are more powerful than pictures. Try drawing a picture of an infinite dimensional Hilbert space.

David Hammen
  • 8,194
  • 28
  • 37
  • In my work on a .NET obfuscator, I found it quite useful to visualise IL code as a flowchart. There is something to be said about seeing loops and conditional branches in a spatial way. I don’t know what it would be like to actually *code* in this though, since I’ve never really come across such a graphical programming environment. – Timwi Oct 07 '12 at 06:34
  • 2
    (Wait, that’s not completely true :) I [have written code](http://codegolf.stackexchange.com/a/2499/668) in an [arguably flow-chart-like language](http://esolangs.org/wiki/Funciton) :) ) – Timwi Oct 07 '12 at 06:40
  • I think APL established that there are at least limits to the degree that symbol usage is helpful. – Erik Reppen Oct 12 '12 at 01:20
1

I find the argument about symbols and structure communicating more (and more quickly) than natural words quite compelling, but then my all-time favourite language is Scheme, so I would.

itsbruce
  • 3,195
  • 17
  • 22
1

I would answer "somewhat".

To be fair I think we have to first factor out our personal bias (ie. familiarity with keywords, syntax, and constructs) and only judge languages that we have never seen before. (To judge the more popular languages we can only accept answers from new programmers as they are introduced to a the language for the first time.) Then, given an identical implementation in several languages, the question posed should be "which of these is easier to understand"?

I would guess that the more there is a syntax hurdle the less likely a language will score well in this scenario, and that favors languages with a cleaner and more obvious syntax.

Much more likely to communicate the programmer's intent will be the choice of variable names and of course the comments that were included, and that transcends nearly all languages.

duanev
  • 109
  • 1
1

I don't read code; I see patterns.

Eventually this applies to all the languages I learn.

The window where 'readable' matters is very short, a few days at most, even for idiomatic languages.

Steven A. Lowe
  • 33,808
  • 2
  • 84
  • 151