Slashdot Mirror


The Great JavaScript Debate: Improve It Or Kill It

snydeq writes "Recent announcements from Google and Intel appear to have JavaScript headed toward a crossroads, as Google seeks to replace the lingua franca of the client-side Web with Dart and Intel looks to extend it with River Trail. What seems clear, however, is that as 'developers continue to ask more and more of JavaScript, its limitations are thrown into sharp relief,' raising the question, 'Will the Web development community continue to work to make JavaScript a first-class development platform, despite its failings? Or will it take the "nuclear option" and abandon it for greener pastures? The answer seems to be a little of both.'"

55 of 482 comments (clear)

  1. In my opinion... by VGPowerlord · · Score: 3, Funny

    In my opinion... kill it! Kill it with fire!

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    1. Re:In my opinion... by statusbar · · Score: 2

      Everything they may replace it with is worse...

      --
      ipv6 is my vpn
    2. Re:In my opinion... by hjf · · Score: 4, Funny

      Why? This is not 1999. We don't "hate" javascript anymore, like we did years ago.

      Now we hate flash. Get on the wave, man.

    3. Re:In my opinion... by smagruder · · Score: 2, Insightful

      I think both should be kept around. They both have their strengths and weaknesses. As a programmer, I like picking the best tool for the implementation.

      --
      Steve Magruder, Metro Foodist
    4. Re:In my opinion... by aztracker1 · · Score: 5, Insightful

      What you are talking about isn't the responsibility of the language, but the underlying API provided by the browser. And yes, there is some movement towards exposing those hardware elements to the JS API. Though not formally part of the DOM... The language itself is in my opinion a very elegant functional prototype based language. Though recent movements are to avoid use of the prototype aspects of the language.

      It seriously bugs me when people confuse the DOM/JS API for a given platform and the language itself. One is not intrinsically tied to the other. JS has been a favorite language of mine for a very long time (since around 1996). It gets a bad rep. mainly because of the browsers' DOM implementations in the v4 browser war... Don't hate the player, hate the game.

      --
      Michael J. Ryan - tracker1.info
    5. Re:In my opinion... by Toonol · · Score: 2

      Yes but does Javascript provide access to hardware (camera, microphone) and sockets? Flash does. The sockets in particular (and the new 3d features just added) should make it considerably better for games.

      Javascript easily could. The browser doesn't. That's the limiting factor. People mistake the limitations that the browser enforces as limitations of Javascript.

    6. Re:In my opinion... by hedwards · · Score: 2

      I agree, death to Flash. The last thing we need is more and better security vulnerabilities.

    7. Re:In my opinion... by Pieroxy · · Score: 3, Insightful

      Nothing can be worse than Oracle. Seriously, you want to talk evil companies...

      You do know we're not talking about Java, right?

    8. Re:In my opinion... by chill · · Score: 4, Funny

      A beautiful rant killed by an ugly fact.

      --
      Learning HOW to think is more important than learning WHAT to think.
    9. Re:In my opinion... by Pieroxy · · Score: 2

      You know, Java, JavaScript, it's all the same crap. For some.

    10. Re:In my opinion... by sneakyimp · · Score: 2

      I understand what you are saying about the language vs. the browser API, but would also like to point out that the enormous variation in API implementations is still a very serious problem for Javascript. This is why you have things like JQuery and Mootools providing a buffer layer between the JS programmer and the browser in the often fruitless attempt to shield a JS programmer from some peculiar browser implementation. One also encounters peculiar browser behavior in flash every now and then when trying to sniff out screen sizes and such. The browser APIs could use some standardization methinks.

      I also tend to disagree that Javascript is particularly elegant. Working with Objects seems particularly primitive to me. I believe someone else pointed out the lack of strong typing and inheritance, among other things. Actionscript 3 does provide strong typing and inheritance and, for better or worse, the Flash player serves as an abstraction layer to more completely shelter the developer from the quirks of the browser.

      What I really do like about Javascript is that all the major browsers support it without the need for any plug-in or player and that it does its job reasonably well.

      Personally, I wish that hardware manufacturers, browser develoeprs, and web standards groups, etc. would normalize and standardize languages and hardware access so that it wasn't necessary to learn Java, HTML, Javascript, Objective C, and god knows what else to write an application for delivery to desktops, tablets, phones, etc. Sure would be nice if we had one language to rule them all and well-defined APIs and security features to gain access to hardware or whatever. Currently, it's a total Babel situation.

    11. Re:In my opinion... by anonymov · · Score: 2

      You sound like you don't know what you're talking about. Probably, you moved to write AJAX application from writing PHP or something and didn't even bother to learn JS better.

      Yes, + can yield either string or number (I don't get your grudge against Infinity and NaN, do you think it's something unheard of and JS specific?), but this behaviour is not uncommon not only for dynamic typed languages, but for static typing with operator overloading. But it doesn't work by some random rules - it's pretty clearly specified. I, for one, never had this bite me.

      Properties don't return null or undefined randomly. null is an explicit value that can be used for "search yielded no results" or similar meanings, and undefined is implicit value of - who'd have guessed - undefined properties. Yes, it's weird to have two NULL-like values, but, again, it's not like they are returned by some non-determinate process.

      Using plain objects created with literals as map type doesn't give you "weird bugs with inheritance" unless you mess up the Object prototype - which is not common thing to do.

      So your only valid complaints come down to the syntax - with those I agree, it would be nice (and destructuring binds/comprehensions/iterators/generators are indeed implemented in Mozilla's Javascript 1.8), but they're not crucial.

    12. Re:In my opinion... by TheRaven64 · · Score: 2

      How does one establish whether methods/vars are public/private/protected?

      One doesn't, but that's fairly common in object oriented languages. Very few actually provide this kind of functionality, and generally they're the ones that don't fully support object orientation.

      Or inheritance?

      JavaScript provides a single chain of prototype inheritance. Any slot lookup is checked along the prototype chain. So, for example, you can set a method in an object, use it as a prototype, and every object will see that method, unless it has its own set. You can then use one of these objects as a prototype and build a longer chain.

      To me, the weird misappropriation of the function keyword to build objects,

      Actually, the problem is the new keyword, which has just plain crazy semantics. JavaScript is very Self-like, but provides Java-like syntax, which is confusing. When you use the new keyword, it calls the function with its this variable set to a new clone of the function object's prototype field.

      If you want to implement something like a class, then you should not do anything in the constructor at all. You should generate a prototype for the class, which has the methods defined and the instance variables set to default values, and set it as the constructor's prototype. When you invoke the constructor (using new ), you'll get a new object that is an instance of your 'class'. You can then add methods to the 'class' and have them appear in the instance, just like in any other object oriented language.

      the verbosity of the code to express objects,

      It's actually not that verbose when used correctly, but you seem to be doing it a slightly strange way.

      and the lack of inheritance, etc.

      As I said, JavaScript does have inheritance and uses it extensively. You seem to be confused because it has inheritance between objects, not just between classes.

      are primitive compared to Actionscript 3, to Java, to PHP5, to C++, and a variety of other languages I've dealt with.

      Wow, you really go out of your way to pick horrible languages. In comparison to that list, JavaScript doesn't seem so bad...

      --
      I am TheRaven on Soylent News
  2. How about neither? by Hatta · · Score: 4, Insightful

    Leave the web for documents. Run applications natively. Why is this so hard?

    --
    Give me Classic Slashdot or give me death!
    1. Re:How about neither? by hjf · · Score: 5, Informative

      Because Google needs you to run everything in their cloud so the NSA,FBI,CIA, and even the DMV can get easy access to all your documents.

    2. Re:How about neither? by amicusNYCL · · Score: 2, Insightful

      The web is not for documents, it is for storing and displaying data. Flexible and powerful interfaces to that data are a part of the web. A client-side scripting language is required for any interface that doesn't require a page refresh on every click.

      Leave the web for documents. Run applications natively. Why is this so hard?

      Yeah, and phones should only be used for making and receiving calls. And GPUs should only be used for rendering graphics.

      I'm sorry you're getting old, but things change whether you want them to or not.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    3. Re:How about neither? by Lisias · · Score: 2

      Leave the web for documents. Run applications natively. Why is this so hard?

      Because native applications "are hard to make", and is run on an equipment not owned by the software maker.

      Web Applications, on the other hand, "are easy to make and deploy", and, most important, are run on software maker's owned (or rented) hardware.

      Had you ever tried to deleted your FaceBook account? ;-)

      --
      Lisias@Earth.SolarSystem.OrionArm.MilkyWay.Local.Virgo.Universe.org
    4. Re:How about neither? by PeanutButterBreath · · Score: 2

      very, very basic behaviors cannot be done on the web without javascript (eg changing the style of an element, showing/hiding content). it (or something like it) is a necessary evil - for now.

      Those are not necessary for consuming documents (or more generally, data).

    5. Re:How about neither? by Hooya · · Score: 3, Insightful

      > Why is this so hard?

      Two reasons, from my experience:

      1. we have large corporate clients (think multinational). They use our services exactly once every year. Over 1,000,000 people in total. Imagine the logistics involved to get a desktop/native application deployed - for that one time use? What if we need to tweak something halfway. How do we re-deploy?

      2. That application is "distributed". Everyone does a little bit that is then accumulated. Sure, we could write a client-server app. Then we'd need to figure out threading issues on the server side, work out the communication protocols, work out locking issues. Or we could let, say, Apache handle the threading (we're good but i'd rather trust software that has undergone years and years of usage - there are other web servers that do this better, i know.) Let HTTP be the communication protocol. Let the backend database handle data locking issues (at least using standard SQL concepts allows everyone to be able to wrap their heads around the issues involved). You could argue that we could use a native app that then uses HTTP. For that, see #1.

      Native apps were great. Far richer experience in terms of UI. But far, far, poorer in terms of distributed-ness and ease of deployment. Or, looking at it another way, the current state of things are due to the evolution of one native app - the browser. It's just that it comes with an established integrated communication protocol and a UI that's flexible/extendable and the guarantee that the shell/runtime is multi-vendor - but largely compatible and available on most computers shielding you from deployment hassles. So it IS a native app that comes with the pieces you need (comm protocol, extension language, widespread availability).

    6. Re:How about neither? by aztracker1 · · Score: 2

      And that is a recipe for failure.

      --
      Michael J. Ryan - tracker1.info
    7. Re:How about neither? by ickleberry · · Score: 2

      If there is one thing the browser hasn't done is minimise bandwidth.

      A SSH session uses about the same amount of bandwidth as it did in the 90's. Now you need a 3mbit pipe just to load an ordinary web page in a decent amount of time. If they just fucking killed off JavaShit the web would be fast once again, and its not just bandwidth thats being wasted; 10 years ago new releases of MS Office bloatware was driving the PC upgrade cycle, now its Web Apps and ordinary websites that have been unnecessarily 'appified'

    8. Re:How about neither? by Riceballsan · · Score: 2

      Comparitively google seems far more interested in keeping your data to themselves for their advertising cash cow. Historically google has flat out refused law enforcement access to peoples accounts without a court order (vs similar situations in which police pretty much just ask and get instant access to peoples facebook). This dosn't Make them angels by any stretch, they still horde all your data like crazy, but in terms of corporations of massive size, google seems to be one that gives the least amount of fucks as to what branches of any government want, and do the least they possibly can get away with to still opperate in their countries.

    9. Re:How about neither? by Tablizer · · Score: 2, Funny

      Leave the web for documents. Run applications natively. Why is this so hard?

      I hereby sentence you to two years of corporate desktop support.

    10. Re:How about neither? by smagruder · · Score: 4, Insightful

      Please keep the politics out. Can't we have a haven for tech-only discussion please?

      --
      Steve Magruder, Metro Foodist
    11. Re:How about neither? by Hatta · · Score: 2

      That's actually a large part of the benefit of native applications. Consistent look and feel, remember that? If Facebook were a local application, it would look a lot like our email and usenet clients. That's all facebook is anyway. A poor reimplementation of email, usenet, IRC and finger.

      --
      Give me Classic Slashdot or give me death!
    12. Re:How about neither? by izomiac · · Score: 3, Interesting

      Apparently, someone thought the concept of files, folders, applications, and menus was too complicated for the 'average person'. Over the years, this idea has spawned countless variations of these concepts in an attempt to make them 'easier' for this hypothetical user. Ironically, the inconsistency and countless layers of abstraction made everything much harder.

      Today, users aren't expected to know what any of that stuff is. The modern user isn't expected to understand what application they're using, or the difference between open or closed. Instead of discrete applications, the web browser is used for everything. Files fall way to the "cloud", the internet is the new OS, the address bar your command line. Javascript has become the new assembly language.

      It's a marketer's dream, and an engineer's nightmare. Constantly changing everything breeds ignorance rather than increasing experience and sophistication. The tremendous complexity means we can see the web start to have the processing power of a 8086, and about a dozen abstracted layers from hardware, each with their own bugs. It probably won't be too much longer before computer science starts resembling biology, i.e. the dissecting and analysis of a complex system from the top down. Amusingly enough, Windows Vista contains about fourteen times more digital data than human DNA. OTOH, only 98% of DNA is 'junk', so it's probably not a fair comparison.

    13. Re:How about neither? by theArtificial · · Score: 4, Insightful

      A SSH session uses about the same amount of bandwidth as it did in the 90's. Now you need a 3mbit pipe just to load an ordinary web page in a decent amount of time.

      You know what else uses the same bandwidth of the 90s? 90s webpages. The websites of today are doing more than ever (streaming video, multimedia rich) and file sizes and screen resolutions have increased. Compare the file size of the average game released today to that of 1999. Why don't you fire up Lynx and save yourself the aggravation?

      You imply that the delays are due to JavaScript yet majority of the data on the wire isn't JavaScript. The delays you're referring to are mostly due to DNS lookups (and subsequent downloads) of byte heavy multimedia like images, video, and other goodies like Flash and data. As sites have grown in complexity a bottleneck occurs with the number of HTTP requests which a browser may make. The CSS file is parsed and the assets are downloaded the user must wait. The wait may be reduced employing a thoughtful design and clever use of domains (and subdomains). CDN (Content Delivery Networks) are popular for this very reason. At the server level on-the-fly compression may be enabled for various mime types (JS, html pages, smaller images etc.) to increase speed even further without requiring application level changes.

      JavaScript may be used in many ways to improve performance on sites, for example: instead of downloading all the map data one only needs what's in the view port. Additionally images which a user never views may not be requested, saving bandwidth. Like any tool it can be misused. Sites which use several ad scripts, analytics, 3rd party widgets etc. are the exception. What about interactive sites (powered by cobbled together server side scripts, made with multiple frameworks) which operate in an underpowered, over provisioned VM, on a shitty pipe with oodles of other sites located on the other side of the world? JavaScript indeed. To see stuff done right look at Amazon.

      So with JavaScript gone you have Flash, video, and data. I'm sure these will all be faster now... (since we're using less of these now than in the 90s, right?)

      10 years ago new releases of MS Office bloatware was driving the PC upgrade cycle, now its Web Apps and ordinary websites that have been unnecessarily 'appified'

      You're leaving out a big one: entertainment, specifically games. In addition new technology such as DVD, Bluray, data interfaces (USB 3.0) factors in too. I however agree with you, plenty of sites are one trick ponies that in the days past would've been a small program are now a web 2.0 site... which will generate insults seemingly using as many technologies and 3rd party service mashups as possible.

      --
      Man blir trött av att gå och göra ingenting.
    14. Re:How about neither? by moonbender · · Score: 2

      No. The two aren't as separable as some geeks would like them to be. Politics/law shape technology; technology shapes politics/law. And in both directions, the influence is significant. Of course there are segments of technology (and politics) where this is less important than for others.

      --
      Switch back to Slashdot's D1 system.
    15. Re:How about neither? by FlyingGuy · · Score: 2

      Because HTML / CSS are the hugest kludge ever. Get it, EVER!!!!!

      The controls suck ditch water, the implementation is without a doubt completely sophomoric and having to contain divs with divs within spans within divs and having to have just the right CSS reset file to make fucking CSS work right, having to jump through insane hoops with CSS which has the most ASS syntax imaginable just to make a pull down menu work correctly completely exposes the utter stupidity of its designers.

      The DOM is the worst bit of cruft I have seen in 25 years of software work, the tools for debugging it are atrocious to non existent and the fact that asshats like the idiots in Redmond still wont go along with what everyone else is trying to do so that the whole fucking steaming pile might actually one day make sense simply spells out that it is completely and utterly broken.

      Applications need to be broken away the whole html/css/js and a program needs to be written that will actually make applications work. It needs data aware controls that are an exact match to the OS they are running on and it is completely doable, today.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
  3. JavaScript fulfills its mission pretty well by smagruder · · Score: 5, Insightful

    If someone wants to add to its mission, or write a client-side language with a different mission, go for it.

    But a lot of the web is running nicely with JavaScript, and pulling out the JavaScript rug from web developers and website owners is really not an option.

    Let's call for some pragmatism here, shall we?

    --
    Steve Magruder, Metro Foodist
  4. Yay, Flash is Dead! by krotscheck · · Score: 2, Insightful

    Now we can all switch to using Javascri... oh. Crap.

    --
    This signature can save you $400 on your car insurance!
    1. Re:Yay, Flash is Dead! by sneakyimp · · Score: 2

      mod parent up. If all these cavemen want to go back to the days before reliable client-side scripting, let them all adopt IE 6!

  5. Why kill it? by drobety · · Score: 2

    I like Javascript, it allowed me to code without having to install big fancy development platform. Given how widespread it has become, I fail to see how killing it make any sense. I don't care about dogma, I care about reality.

  6. Why stop at Javascript? by Ragun · · Score: 2

    JavaScript was meant to manipulate documents, and is used to make those documents into applications.

    Lets just throw out HTML altogether and come up with a new language to make the client side section of web apps with. HTML was never envisioned to do this.

    1. Re:Why stop at Javascript? by Anonymous Coward · · Score: 2, Funny

      Great idea! Maybe some sort of an eXtendible Mark up Language....

    2. Re:Why stop at Javascript? by MichaelusWF · · Score: 2

      A good idea, but here's what that will accomplish: http://xkcd.com/927/

  7. Re:What failings? by Anonymous Coward · · Score: 2, Funny

    You shut your mouth! You shut your GODDAMNED MOUTH!

  8. The unpopular vote by gadzook33 · · Score: 3, Interesting

    I know I'm going to get banned from /. for all time, but can we talk about something like Silverlight please? It's a dream to program for and it does all the stuff that we wish javascript did. Ok, begin anti-M$ rhetoric.......now

    1. Re:The unpopular vote by Microlith · · Score: 4, Insightful

      Soon as Microsoft surrenders language and library development to a 3rd party that operates in an open manner and allows any and all uses without royalty requirements.

      As it stands? No way. That's just handing Microsoft what they've always wanted.

    2. Re:The unpopular vote by Ragun · · Score: 2

      I think you answered your own question.

      How on earth is a standard supposed to spread when everyone and their mother distrusts the people producing it? No one trusts them to contribute to the field without some kind of nasty lock-in, and their is a reason for that distrust.

  9. Mission creep. by PeanutButterBreath · · Score: 4, Funny

    I decided it would be a neat hack to flood my living room and turn it into an indoor pool. Boy, did that reveal some serious shortcomings in my home's electrical system. Can any recommend an electrician who doesn't suck as bad as the guy who installed the one I have now?

    1. Re:Mission creep. by yincrash · · Score: 2

      I recommend Fluorinert

      It might even be possible to breath underfuorinert!

  10. Too well, probably. by PeanutButterBreath · · Score: 2

    People keep figuring out how to do even more with JavaScript, forgetting that just because you can, doesn't mean you should.

  11. Dr Strangelove by JLennox · · Score: 2

    I used to hate javascript. I'd disable it in my browsers up until a few years ago and avoid it like the plague in all of my web development tasks. A year and a half ago I became a full time web developer.

    I had to shut up and learn to love javascript, and I really do. There's nothing wrong with it.

    A language like PHP3 lacks enough features to make many common patterns possible. Progressing to PHP4, and PHP5, more and more patterns became possible. PHP can now house proper code, though it frequently doesn't because people still hack away like it's PHP3 or PHP4

    To me, javascript feels much the same way. I never come across a pattern I can not implement, though I see a lot of coding that ignores standard patterns to it's own demise. linq.js, underscore.js, jquery, and some in-house libraries make classes, objects, collections, DOM work, etc, amazingly simple. The standard library is very poor, but that's ok because the 3rd party libraries are fantastic. Outside of IE8 and under, the speed is FAST too.

    A lot of times there's a function that will be implemented by a library but can optionally wrap to a native function if available, making support for everything universal.

  12. Re:What failings? by larry+bagina · · Score: 2, Informative

    HTML5 has worker threads. Javascript does have prototype inheritance.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  13. I wouldn't mind Lua by FictionPimp · · Score: 3, Interesting

    I wouldn't mind if they added Lua to web browsers.

  14. Static Strong by kervin · · Score: 4, Interesting

    Give us a static strongly typed alternative/extension without the literally hundreds of known design flaws.

    How about a Javascript that's more Java-like?

    1. Re:Static Strong by Yold · · Score: 2

      How about a Javascript that's more Java-like?

      Real private and public modifiers would be nice, but I wish people would take the time to understand why the LISP-like qualities of JavaScript make it awesome. I often find myself wishing that .NET and Java were more like JavaScript. To be an exceptional .NET or Java programmer, you need to know tons and tons of specifics about the language. To be a good JavaScript programmer, all you really have to understand are the concepts related to objects and scope.

      I think Java and .NET are great enterprise languages for applications that are 10,000+ lines of code. But writing JavaScript in a message-centric fashion (think LISP or Objective-C) is very pleasing with it's terse expressiveness. The language is flexible, and works great for applications that are developed and maintained by one or two programmers.

      But the end seems to be near for good-ol-JavaScript; I feel the same way that the LISP programmers must have felt when C and COBOL began to assert their dominance. I'm sad that this inefficient toy-language will soon be relegated as an obsolete and inferior language.

  15. Missing the point by Okian+Warrior · · Score: 2

    I think many people are missing the point of Javascript.

    The new spec includes the ability for Javascript to open sockets. Once that takes hold, you'll have the ability to completely control the browser window from the home server.

    When that happens, it will be big. The browser is essentially a rendering machine which makes it trivially easy to show things and is largely machine independent. Instead of selling a huge monolithic program, companies can simply sell time on their servers to run their programs.

    Imagine that you want to use a big engineering program - Orcad or Altium Designer, for example.

    Instead of paying $10,000 for a copy of the program and taking a chance that it's as good as it's marketing claims, you can buy a month of usage for $100, and the executable will run on the company's servers while using your browser to paint the screens. Sort of like how World of Warcraft runs on servers, but paints the screens locally.

    This has many advantages for the user:
    1) You don't have to risk an enormous sum of money to try something out
    2) You don't pay for the product more than you need it
    3) You have NO installation issues
    4) You are always using the most up-to-date version
    5) The vendor can keep backups of your files for you
    6) You can access your files and the application from anywhere on the net

    And for the vendor:
    1) The code is never given out (only runs on the server): no piracy!
    2) You don't need multiple versions for different architectures (reduced engineering)
    3) You don't have to push updates to the users all the time
    4) You can tune the compilation/installation to make the best use of the server
    5) Rendering is much easier - the bulk of the code is written for you by others (reduced engineering)

    There are some disadvantages - the vendor has access to the document, which means that they can also sell the document to spammers (designs to China, for example). This can be dealt with by using a trust model; ie - the company will have an online reputation which will get quickly tarnished once this happens.

    That's the promise of Javascript, and the real potential of the cloud. Companies supplying online services to compete for customers.

  16. Can't Be Everything To Everyone by Tablizer · · Score: 2

    I doubt very much a language syntactically and stylistically optimized for light-duty GUI event scripting can be a good language for implementing OS-like features and vice-verse. Leave JS alone and create a new language that's a better fit for "deep guts" programming.

    What's next, ADA-Script?

  17. How many times will we have this argument? by rabtech · · Score: 4, Insightful

    The history of the Internet and examples like IPv6, HTTP, SMTP, etc have shown us over and over that "good enough" + evolution trumps replace almost every time.

    The path forward is clear: improve JavaScript, extend it, improve HTML, and keep on trucking. Neither will ever be replaced on a wide scale, only evolved.

    The reason we don't already have worldwide IPv6 deployment is they redesigned IP instead of just extending the addresses.

    --
    Natural != (nontoxic || beneficial)
  18. Re:Lua by shakesoda! · · Score: 2

    I can't support this idea enough. Lua would be just about the best possible thing that could happen to the web.

  19. Re:What failings? by Pieroxy · · Score: 2

    Wrong on three counts (should I say two and a half?). Not bad.

    Support for threads is coming (already there in some browsers).
    There is block level scope since JavaScript 1.7
    There is inheritance, since day one.

    No strong typing, granted.

  20. Read Crockford's "Javascript: the good parts". by csirac · · Score: 4, Informative

    How does one establish whether methods/vars are public/private/protected? Or inheritance? To me, the weird misappropriation of the function keyword to build objects, the verbosity of the code to express objects, and the lack of inheritance, etc. are primitive compared to Actionscript 3, to Java, to PHP5, to C++, and a variety of other languages I've dealt with.

    You really need to read Crockford's "Javascript: the good parts". You absolutely do make private methods and vars (ever noticed that you can't directly call jQuery's internal methods? Or TinyMCE's? Or any other major library/framework?)

    He also makes the case that actually JS has more patterns to allow code re-use. That's why things like Mootools can even fake things that look like classical class inheritance patterns for you, if you really want to do that.

    Check out http://www.crockford.com/javascript/inheritance.html and http://javascript.crockford.com/prototypal.html and http://www.slideshare.net/douglascrockford/javascript-the-good-parts-3292746

  21. Re:I kind of liked the sidetrack, actually. by rthille · · Score: 2

    Earth?

    --
    Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/