JS Parallels to Forth

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
 
S

scriptguru

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
It is all right. But I think the main target is the how the programmer
can tell his/her thoughts using particular language. IMHO JavaScript is
one of the best languages because it offers almost infinity od ways to
express your thougts using the way you want.
About sharing the code. I think that in any case you'll have to rewrite
the code for your application. Maybe just slightly modufy, but somtimes
complete rewrite. One of the main abailties of the language is an
ability to be transparent and understandable. I think JS is. You can
read other's program and write your own using the same algorithm (but
using the way that is better for you).

Val
 
J

Jake Barnes

aum said:
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?

It's absolutely true that such flexibile languages lead to radically
different styles. But Javascript's current position goes way past even
that. It is being picked up whole new industries that have nothing to
do with the web. It is being applied to completely new problem domains,
and it is being dressed up with new APIs that have nothing to do with
browser DOMs. Consider the fact that Adobe now uses Javascript as its
cross-platform scripting language. Last year my biggest freelance gig
was when I was hired to help a large jewelry company automate the
production of its print catalog. Below is a link to a script written
for the Adobe Photoshop Javascript API, how much of this makes sense
to you? There is no Folder.selectDialog when you're working on the web.


(I was paid to teach the graphic designers at that company how to
program in Javascript, so that they could modify my scripts after I'd
left. I decided to teach them programming by walking through scripts
one line at time, and explaining each line thoroughly. I also
documented the script much more thoroughly than is normal, and in a
simplified, not-so-techy language).

http://www.krubner.com/loop_through_folder_remove_part_file_name.js
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top