Is Javascript the SmallTalk 2012?

There is a lot of hype surrounding JavaScript.

Years ago Google started the developing of V8, a super Just in time compiler for its Chrome Browser.

The V8 compiler revamped competition: Microsoft and Mozilla foundation strike back optimizing their JavaScript interpreters.

On these days, a strong community is growing using Node.js, a web server “Evented I/O [Web application server] for V8 JavaScript“. Node.js sposts a non-blocking architecture which can lead to very fast server, able to process a lot of request with a single thread.

A quick peek on the people now. Lars Bak is the leader of the V8 project. It has worked on the design of Self and on the HotSpot JIT.  Lars Bak also co authored “Mixin in StrongTalk”.

So a lot of the optimization which let  Smalltalk and Java shine, are used in the JavaScript field nowadays. It is a simple “accident” 🙂 ?…or it is destiny?

JavaScript rocks? There is plenty of documentation all around, even if the first ECMA specification was quite unreadable in my humble opinion 🙂 There are some optimal guidelines for JavaScript module writing, for instance see the manuals on JQuery plugin development. But in JavaScript you are still a free player if you wish: no rule, no even need of structuring your code in some way:

var sith={}

sith.name=”DarthVader”;

sith.name=function(){
return “Nevermind, I am a function, now”;
}

The code above builds a very generic object, and add to it properties (which could be a function).

Worst, you get very strange things, evaluting:

[1,2]+[3,4]

you got:

“1,23,4”

This because “+” is not supported for arrays, so the JavaScript  language is effectively doing…

([1,2]+””)+[3,4]

I like dynamic languages like Self, but this is somewhat too…flexible 🙂

And last but not least JavaScript lacks a true integrated developement environment, even if here we smalltalkers could help a bit 🙂

So, SmallTalk2012 is not this version of JavaScript, at least not yet; JavaScript Harmony specification is working hard trying to polishing the language…As usual, the better way to predict the future is to …invent it… So let’s give Harmony a chance!

Comments

18 responses to “Is Javascript the SmallTalk 2012?”

  1. John Kimber Avatar
    John Kimber

    Dart (http://lambda-the-ultimate.org/node/4355#comment) with its Newspeak connections sounds a more promising approach.

    Like

  2. daitangio Avatar

    I am a bit doubtful on Dart future. As I have already wrote
    http://gioorgi.com/2011/is-javascript-a-better-evil-then-dart/
    Dart is another new programming language I think we need not.

    Ajax is knocking down rich client application (flash or javafx based) because it can run on modern browser without plugins.

    So dart could be the “yet another ‘plugin’ ” we couldn’t use in our mobile device 😦

    Like

    1. John Kimber Avatar
      John Kimber

      How about Newspeak – is that a language we need not?

      Here’s a few of Newspeak’s features:

      * Late binding = highly dynamic
      * Mirror based reflection
      * Nested classes
      * Language level mixins
      * Parametric modules
      * Pattern matching
      * Keyword based syntax for method names (arity > 2)
      * Concurrency through Actors (planned)
      * Pluggable types (planned)
      * Composable UI framework with native widget mappings
      * Web browser like development environment with integrated debugger
      * Can compile to Javascript
      * Executable grammars
      * Push button deployment
      * Security based on capabilities provided

      The current VM is Smalltalk based, a silicon implementation would be a nice addition to the list.

      Like

      1. daitangio Avatar

        I see newspeak is developed, latest snapshot is of this August. I will give it a try. Anyway, nodejs/jQuery/etc communities are very active on their fields, so I will suggest to keep an eye also on JavaScript evolution…
        thank you for pointing me to newspeak!

        Like

  3. commentator Avatar
    commentator

    Is Javascript the SmallTalk 2012?

    No it is definitely not. Hahahaha … funny.

    Like

  4. Todd Avatar
    Todd

    If anything is the new smalltalk it would be factor..

    http://factorcode.org it has workspace and interactive debugging that smalltalkers love so much.. Though the language itself is more like a strongly typed mixture of forth and lisp..

    Like

    1. daitangio Avatar

      Factor is also interesting. Anyway what is surprising me is the strong community behind projects like node.js and jQuery. Node.js mailing list is twice active then Scala one, and they are equally “fresh”.

      Like

  5. […] was a little suspicious on the new JavaScript wave, I also wrote a small article comparing  JavaScript and SmallTalk/Self approach. In that article I was a bit evil on JavaScript, because of my SmallTalkness, I […]

    Like

  6. Hello71 Avatar
    Hello71

    “lacks a…IDE”

    What about Cloud9?

    Like

    1. daitangio Avatar

      At the meantime Cloud9 is more a service then a true IDE.
      I do not know how hard is to install it on a computer not connected to internet. An IDE can work disconnected from the network…

      Like

      1. Hello71 Avatar
        Hello71

        git clone git://github.com/ajaxorg/cloud9.git
        cd cloud9
        bin/cloud9.sh

        Done.

        Like

  7. Bear Avatar
    Bear

    What about Amber – smalltalk on javascript?

    http://www.amber-lang.net

    Like

  8. Mike Avatar
    Mike

    Jtalk may well be the future Smalltalk that runs in every browser (even smart phones – all platforms). Likewise Clojurescript may be the future Lisp…

    Like

    1. daitangio Avatar

      Can you point me a link to jtalk? I have tried https://github.com/NicolasPetton/jtalk but it seems deleted (got 404).

      Like

      1. Mike Avatar
        Mike

        http://nicolaspetton.github.com/jtalk/
        also another one: http://amber-lang.net/

        I think a third was started by Dan Ingalls himself, called LivelyKernal or something. While he was at Sun so may have been eaten by the Oracle

        Like

      2. John Kimber Avatar
        John Kimber

        And Lively Kernel at http://www.lively-kernel.org/list/index.html is very active these days.

        Like

  9. globo Avatar
    globo

    It is funny to recall that the first application server released by Netscape was actually based on javascript (server side). Nothing new …

    Like

Leave a comment


Discover more from The Weekly Squeak

Subscribe to get the latest posts sent to your email.