A
aum
In the end, [choice of Javascript programming idiom] comes down to
community, and how much support that community can offer.
Thanks for that, Jake, and for your more balanced take on the issue of
'dressing up' Javascript to resemble the style of other languages like
Python or Ruby.
In Javascript, I see a lot of philosophical similarity to Forth. Both
Forth and Javascript are extremely 'liberal' languages of immense
expressive power, which lend themselves to highly idiomatic styles. Lua
falls into this camp somewhat as well.
Contrast this to Java (the Pascal of the 1990s and the darling of
corporations); also Python, which goes so far as forcing homogeneity with
whitespace and indenting. Not to mention COBOL (for those crusty enough to
remember it).
Languages of such extreme liberal design as Javascript, Forth and Lua will
naturally give rise to diverse, fragmented communities, just as liberal
forms of music give rise to umpteen genres and sub-genres. Within these
fragmented communities, sharing and integration of code may become
difficult.
Is there a trade-off between a language's expressive idiomatic power, and
the readability of the average 1000 lines of code written in that language
by a stranger?
I've done quite a bit of both Forth and Python. But the average 1000 lines
of Python from a stranger is far more readable to me than the average 1000
lines of Forth, and integrates much more easily into my repository.
So to me, there's a balance here. The expressive power of a language is
one virtue, the ability for a language user community to share, understand
and integrate code easily is a different virtue, and it's damned hard to
get the two together in one language.
Cheers
aum