473,785 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JS Parallels to Forth

aum
On Mon, 18 Sep 2006 06:16:29 -0700, Jake Barnes wrote:
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
Sep 18 '06 #1
2 1818

aum написав:
On Mon, 18 Sep 2006 06:16:29 -0700, Jake Barnes wrote:
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

Sep 18 '06 #2

aum wrote:
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.selectDi alog 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_...t_file_name.js

Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2052
by: John Benson | last post by:
Since I've seen some Forth expertise/interest in evidence here, so I'll permit myself some observations on Lua/Python/Forth. Lua's scripting command syntax is pretty simple, though different from Python's. It is reference- and not variable-oriented (that is, "variables" are merely holders for references, not values) and smacks of Python in this regard. Functions are first-class objects; again, very similar to Python. The big...
38
4812
by: BORT | last post by:
Please forgive me if this is TOO newbie-ish. I am toying with the idea of teaching my ten year old a little about programming. I started my search with something like "best FREE programming language for kids." After MUCH clicking and high-level scanning, I am looking at Python and Forth. Both have advocates that say each is a great approach to learning computers. My programming classes were a long, long time ago in a land far, far...
1
2936
by: Albert van der Horst | last post by:
I am trying to do some web scripting in Forth This is a transcript of the perl example from O'Reilly (Gundavaram) CGI-programming pg. 17. With the multiple line strings and the occasional auxiliary word, it looks neater than perl IMO. However, no environment variables can be accessed from the script apparently. The corresponding perl script has no such problems. (Environment available in an associative
2
2533
by: Lisa Pearlson | last post by:
Hi, My php application (on Apache/Linux) needs to do the following: The PHP script receives a request from a client (binary), asking for certain records of data. My PHP script loops through all records and sends each of them ONE BY ONE. After each record that my server script sends, it waits for the client to confirm proper reception with an ACK (binary digit). When there are no more records, my server script sends the client a binary
50
5740
by: diffuser78 | last post by:
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans
42
5463
by: John Doty | last post by:
I realized that I have a little job on the table that is a fine test of the Python versus Standard Forth code availability and reusability issue. Note that I have little experience with either Python or Standard Forth (but I have much experience with a very nonstandard Forth). I've noodled around a bit with both gforth and Python, but I've never done a serious application in either. In my heart, I'm more of a Forth fan: Python is a bit...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.