• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

what does it mean by- javascript is a lightweight programming language ?

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to javascript world basically i am a java developer recently,
I am learning javascript: somewhere i read that javascript is a lightweight programming language. I wonder What does it mean, in what sense javascript is lightweight??
Posts: 200
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Narendra,
I think this is one of those questions which doesn't have a definitive answer and you're likely to get different answers from different people depending on what they think of as "lightweight".

Here's my answer: I think JavaScript can be thought of as lightweight because (at least up to ECMAScript 5) it isn't a particularly "big" language with many many constructs. It's actually a fairly simple language for the most part. Now, each new release of the language inevitably adds more "stuff" to it, which makes it less lightweight. Personally, I don't like that inevitable march towards more "stuff". I like when languages are lightweight: that makes the language easier to learn and understand.

A related way to think about whether a language is lightweight is: is the interpreter/compiler/execution environment for that language simple and fast? Which is really only possible if the language itself is simple. JavaScript engines have become a lot more complex in the past few years, but the tradeoff is that executing JavaScript code has become a LOT faster. I really have no idea how a JavaScript engine compares in complexity to, say, a Java compiler/runtime so I don't feel qualified to really comment on that end of it.

Another way to think of this is to consider the language "ecosystem": how many libraries and frameworks are built for it? While libraries and frameworks are useful, they can make a language feel less lightweight, because if using those libraries and frameworks becomes a necessary part of working with the language (your employer requires it, or your co-workers, or "everyone is using library X"), then again, it's more "stuff" to wrap your head around. In that sense JavaScript becomes less lightweight by the day as more and more libraries and frameworks are released.

In conclusion, I'd say that I think the core JavaScript language is still fairly lightweight, but the JavaScript ecosystem is becoming a lot heavier by the day.

pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic