View Single Post
  #6 (permalink)  
Old May 29th, 2006, 01:00 PM
ninejaguar ninejaguar is offline
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

While I'm still going through the book, I'd like to mention that I'm finding it clear, thoughtful, and full of insight. But, since you asked for suggestions for a second edition, I thought I'd add my two cents. This isn't a criticism of the 1st edition (I'm not done yet, but I already suspect it's probably one of the two best books on JS out there). It's just that you asked for suggestions...;)

After reading a few things on the web, I'm beginning to understand that JavaScript can actually be considered a Functional programming language, and has quite advanced concepts such as Closures, which your 1st edition touched on briefly (kudos on even mentioning it!). I would love to see a proper treatment of JavaScript's more powerful and expressive aspects as suggested by the following links:

http://javascript.crockford.com/javascript.html
http://javascript.crockford.com/little.html
http://jibbering.com/faq/faq_notes/closures.html
http://en.wikipedia.org/wiki/Closure...ter_science%29
http://www.svendtofte.com/code/practical_functional_js/

I find the idea of JavaScript as being a descendant of Lisp+Self very exciting. I've read that Lisp is one of the most expressive languages, but its use of parentheses is a put off to beginners (they say you begin to overlook, and eventually enjoy it). If JavaScript can be used as one would use Lisp, then maybe JavaScript can also be considered as expressive, but without having to balance parentheses.

There's a claim in the jibbering.com link that JavaScript (using Closures) can emulate anything. However, because Closures are so easy to create, it is also claimed that web-developers accidentally create Closures without realizing it due to ignorance of JavaScript as a Functional programming language. The results of accidentally creating Closures is said to be undesirable and potentially problematic for the application. The argument then is to improve one's understanding of Closures to reduce problematic code, and to enhance the code by judicial use of Closures. Perhaps, this can be done by studying JavaScript as a Lisp variant, without having to learn Lisp.

Apparently, JavaScript's relationship to Lisp is so close, there's a Lisp-dialect that compiles to JavaScript called Parenscript.
http://www.cl-user.net/asp/libs/parenscript
http://blogs.bl0rg.net/netzstaub/archives/000525.html
http://lemonodor.com/archives/001099.html

It's now been incorporated into the UnCommon Web:
http://common-lisp.net/project/ucw/

I already have your 1st edition, and would jump to get the 2nd edition if you could simplify the full functional concepts in those links for us beginners. Or, maybe a new book dedicated towards Functional JavaScript...
"Expressive JavaScript"
or
"Professional Fun(ctional) JavaScript" (even has parens - :D)
or
"Professional Fun(JavaScript)" (okay, now I'm getting silly! - )
or
"Professional JavaScript for Software Engineers" with lots of examples! A Functional type of book would be a first, even beating O'Reilly. Might even be the new JavaScript bible

On the chance no one writes that book (please do!), I've compiled what I hope to be a useful list of Lisp resources that might be applied towards learning advanced JavaScript as a Functional language:
http://slashdot.org/comments.pl?sid=186859&cid=15419175

= 9J =
Reply With Quote