Slashdot Mirror


JavaScript Inventor Speaks Out

Anonymous Coward writes "Brendan, on his mozillazine blog talks about JavaScript 1, 2, and in between in light of DHTML and AJAX. In an informal blog entry he answers frequently asked questions such as fixing Unicode in regular expressions, multi-threading, weak numeric typing, and obfuscating code."

11 of 267 comments (clear)

  1. It Would Be Nice... by __aaclcg7560 · · Score: 2, Interesting

    If the "write once, run everywhere" feature was implemented. ;)

    On a related note, I had an interview at Adobe a while back and the interviewer mentioned that javascript was the scripting language for a lot of their products. I drew a blank on that one since I had no idea how use javascript for an application (and, subsequently, didn't get the job). When an application uses javascript for the scripting language, does that mean a javascript parser is also implemented into the application? Or can javascript be used in a standalone environment?

    1. Re:It Would Be Nice... by fm6 · · Score: 2, Interesting

      WORE is Java, not Javascript -- though I'm guessing you knew that. There's actually a platform-independent Java software out there. It's just that people have become too cynical about Java hype to care.

    2. Re:It Would Be Nice... by LetterJ · · Score: 2, Interesting

      PHP->COM->Photoshop is a bit of fun. At least for the few prototypes I've built for the fun of it (yes, that's the kind of sick freak I am).

      Most open source scripting languages can access COM objects on Windows. Once the syntax issues are out of the way, most of them work the same way.

  2. JavaScript by nepheles · · Score: 4, Interesting

    It's a pity JavaScript rarely gets the attention it deserves as a legitimate programming language. Most guides to C begin with teaching you how compilers work; most guides to JavaScript teach you how to swap some images.

    This is unfortunate as it's quite powerful: it supports first-class functions and an excellent generic object-system, not to mention the usual suspects such as dynamic memory management.

    Hopefully its apparent resurgence these days (as browser vendors get their compatibility acts together) will change this.

    --
    ((lambda x ((x))) (lambda x ((x))))
    1. Re:JavaScript by dtfinch · · Score: 3, Interesting

      I protect my javascript with stuff like this:

      // Copyright 2005 David Finch
      // Don't steal

      It seems to work. There must be a few people out there who still respect copyright.

      I even put a BSD license on one of my scripts, essentially making it public domain, and somebody asked for permission to copy it.

      shameless plug

    2. Re:JavaScript by dustmite · · Score: 2, Interesting

      Heh - interesting, I've had similar experiences. I've written a few (very) small OpenSource games - nothing major, nothing well-known. I've distributed them very clearly under either GPL, BSD or even 'public domain' licenses.

      Yet people seem to have always asked my permission before using the source for anything, however tiny and insignificant the use. Some guys also asked my permission once to do a fork.

      In the beginning it seemed quite weird to me, now I'm kinda used to it.

      So yes, people seem to generally respect copyrights.

  3. Javascript doesn't suck by stevens · · Score: 5, Interesting

    As someone who'd only used Javascript in creating DHTML, I'd worked up a good hate against it. But what I'd hated was really the ridiculously incompatible implementations of the DOM in IE/Netscape. I also hated the embedded space itself--shitty delivery method (encoded or called from HTML, no #include, no namespaces).

    Then I started writing extensions for firefox. I'm trying to show my company that (firefox + xul + js) > (ie + activex). I'm mostly successful, since we already have lots of XML over HTTP data services primed for XmlHttpRequest.

    But it turns out that the language doesn't suck so bad. Sure the namespace problem is JS's fault, but the rest is the embedding. Using JS for firefox exntensions allows you to code to one platform; make more OO libraries, etc. I even generate classes from the DTDs I make the XML services from.

    Who would've thunk it's really a decent language in the dynamic, lambda-toting, functional-ish area?

  4. Re:JavaScript Vrs. TCL by fm6 · · Score: 3, Interesting

    I think by the time Javascript came along, Sun had pretty much lost interest in TCL. I heard stories about people trying to license the Sun implementation of Tcl/Tk and getting a runaround. It's probably not a coincidence that Ousterhout left Sun (and took Tcl with him) at about the same time as Eric Schmidt, who brought Ousterhout on board in the first place.

  5. Re:JS is very functional by CTho9305 · · Score: 4, Interesting

    Especially when combined with XUL.

  6. Re:The difference between the language and... by Da+VinMan · · Score: 4, Interesting

    If that's your "secret" then you need to get out more. :+) Seriously, give Ruby a try. I think it will quite easily scratch the itch you're expressing. It has none of the confusion surrounding it that JavaScript does and it's quite a worthy desktop application and web application language. Oh, and if you're going to give Ruby a try and aren't totally addicted to Emacs or vim at this point, then give the Arachno IDE for Ruby (at http://www.ruby-ide.com/) a spin. It's not free, but it is cheap.

    FYI - Learning Java can also be worth your time; it's not so bad. But really, if you're going to have your application execute on the client in a browser, then Java really isn't a good choice these days. (Although I'm sure some would beg to differ; it is *possible* after all. I just don't recommend it.)

    Have fun!

    --
    Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
  7. Don't evolve; stay a *standard* by mactari · · Score: 2, Interesting

    I'm sorry, but this comment simply doesn't hold:

    JS is not going away, so it ought to evolve. As with sharks (and relationships, see Annie Hall), a programming language is either moving forward, or it's dead.

    No, when a programming language doesn't chance, it's called a standard. Look at what we've been able to do keeping html, css, and javascript a stable target for so many years! It's like Space Invaders on the Atari 2600 -- nobody who created that console, its hardware designed specifically for playing Combat and Video Olympics, expected someone to be able to slap six sprites in a row, much less have the player shoot then down one at a time. The 'standard' that was the 2600, however, gave a stable platform for programmers to learn tricks that would give the console life well beyond its creators' expectations.

    We've got something like that with javascript, and we can see what happens when we compare to something like Visual Basic 6. Developers are still upset about Microsoft's decision to drop official support for VB6 in an attempt to force people to upgrade to VB.NET. Know what? Those upset programmers have found that VB6 hasn't rusted and simply continue using it to create their apps. There are more companies than you'd know (here's one) whose major apps are/were written in VB6, the 'prototyping language'. They're not quite ready to cast the baby out with the bath.

    Fix bigs in javascript? Absolutely. The issue is that we've reached a point where nearly every browser anyone uses supports a 'single' flavor of javascript and we're all familiar with how to make our code work with the few quirks that remain crossplatform. There is a standard on nearly every box on the net that coders can assume will be there for them. I wouldn't want to see anyone mess this stable delivery platform up, splitting the user base into something like what we had in the Netscape 4.x/Mozilla/IE 4 & 5 days. Now *that* was an ugly time to code.

    The bottom line is that evolution is an overused metaphor. You've got two choices if you'd like to propagate your genes into the future: immortality or reproduction. Immortality was a little too difficult to accomplish for living, unique individuals. Perhaps there were little organisms that could live forever, but something squashed 'em. They're gone. That's not a problem in the digital world, folk. We can make as many exact copies of an individual as we'd like. Javascript modules are not unique. They don't need to evolve. (I mean, come on, he even mentions sharks, a design that hasn't changed in millions on millions of years!)

    Javascript should shoot to become an immortal standard, not another field of play and debate.

    --

    It's all 0s and 1s. Or it's not.