JavaScript is the new C

assembler programming languageIn the days when processing power was expensive, writing assembler code was the benchmark, and high level languages were seen as an extravagance, C was a revelation. Near-assembler fast, bit-level operations, but still an expressive 3GL.
OK, so nothing like JavaScript then?

Wait, that’s only the beginning of the story.

C programming languageWith its unique advantages, C quickly became ubiquitous, and C compliers appeared on every computer and OS. Then over time, as the cost of processing power fell, and all programmers began exclusively using high level languages even for realtime applications, C’s real value emerged from that ubiquity: C was the only truly platform-independent programming language. By 1990, you could write a C program and run it on any computer in existence.
Today Javascript has taken over that mantel.  C/C++ is no longer universal. Only Javascript will run on Windows, Linux, OS X, iOS and Android platforms.

We use JavaScript. For Everything. We use it to build single page web apps. We use it to develop our server APIs. We use it for our mobile aps. And you can bet we will use it for whatever is next. Frm browser  to server we use 100% JavaScript.

JavaScript programming languageJavaScript is the native language of the browser. Unlike C or Java, JavaScript wasn’t really invented as an attempt to create a universal language, but it has evolved to become that. Like the evolution of mankind, it just kind of happened. It evolved from the scripting applets of Netscape explorer times into something more powerful and ubiquitous. Today it exists in every browser, on all platforms, on desktop and mobile devices.
Node.js enabled JavaScript to escape the confines of the browser, and provides the server-side platform for building the APIs that power all of our apps.
No, I wouldn’t use JavaScript for a CPU-bound application, like a chess computer. Thats not a great use of JavaScript. But if I’m building a realtime web app, which I mostly am, it is the best tool for the job – for both server and client.
It’s often said JavaScript is “an easy language to learn and a difficult one to master”.
The web is still evolving. And so, too, is JavaScript.

5 comments

  1. hightechwonder

    Here is my take on this , Been using “C” since the 1080’s .. Wrote my first C program about 1984… Of course “Hello , World” , from the little white C bible C and R … C Programming Language.

    C must be compiled… and Javascript Does Not !!!

  2. Dave Watts

    I might go as far to saw that I WOULD use JavaScript to build a CPU-bound program like a chess computer, because I would just use Node, which is really just converting my JavaScript to C/C++ which is what (I assume) you would use instead of JavaScript?

    Why? Answer: Universal language. The biggest benefit of JavaScript is not the language itself. In fact it’s not a beautiful language. C# is a beautiful language, but unlike C# and every other language in the world, you can now (largely thanks to Node) do literally anything with JavaScript. That means you only need to know one language. Gone are the days of one guy for server-side, another guy for main-frame, some other guy for client scripting – it’s all now just one guy.

    I remember the time when I switched from C++ to C# and later included ASP.Net and I declared that I would never ever switch my core language to anything else. And here I am, writing everything in JS!

  3. William D'Silva

    C is still used in low level microcomputers when assembly language is not an option or is too tedious. JS/Node will not run on a small Microchip or similar micro controller where RAM is tight.

    So, I would not give up C just yet! C is simple as the libraries are where the real power lies.

    Love your blog! Keep on blogging please.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s