AceNik's Portal

Update To All Your Tech Fads Begins Here !!!!!
Featured Posts
Nokia's N96 Now Official, Quad-Band and WCDMA

Nokia's N96 Now Official, Quad-Band and WCDMA

After much leaking of information, Nokia's N96 slider cellphone is now official. It's a quad-band, US 3G-enabled (WCDMA) phone with a 2.8-inch screen, 16GB of built-in memory, a 5-megapixel Carl-Zeiss Tessar lens, A-GPS and 802.11 b/g Wi-Fi. The media-player functions of the phone get their own dedi

Continue to read more...

Sun Java Runtime Environment 6.0 Update 14

Java software allows you to run applications called "applets" that are written in the Java programming language. These applets allow you to have a much richer experience online than simply interacting with static HTML pages. Java Plug-in technology, included as part of the Java 2 Runtime Environm

Continue to read more...

Firefox 3.7 Theme Makes Your Browser Look Awesome

Firefox 3.7 Theme Makes Your Browser Look Awesome

Windows only: Mozilla released their version 3.7 theme mockups only a few days ago, but you don't have to wait for the 3.7 release to enjoy them—a motivated user already created a lookalike theme that you can install now. (Click the image above for a closer look.) Installing this theme isn't q

Continue to read more...

New Treatment Filters Bacteria From the Bloodstream with an Electromagnet

New Treatment Filters Bacteria From the Bloodstream with an Electromagnet

This may sound like something out of Iron Man, but it's very real. Don Ingber has developed a machine that uses an electromagnet to suck sepsis-causing bacteria out of the blood. In lab tests, Ingber's team mixed donor blood with the fungus Candida albicans, a common cause of sepsis, and added plast

Continue to read more...

Intel Big on 32nm Westmere Processors for Consumers in 2010

Intel Big on 32nm Westmere Processors for Consumers in 2010

At today's San Francisco event, Intel mostly discussed what we know about the upcoming Westmere processor, but revealed they're scrapping the next dual-core 45nm processors, in favor of 32nm Westmere chips in early 2010. The first Westmere chips will be the dual-core Clarkdale and Annendale pr

Continue to read more...

New Method of Writing Hard Drives Could Yield 1TB Per Inch Density

New Method of Writing Hard Drives Could Yield 1TB Per Inch Density

Current hard disk drives are up against their ceiling: a few hundred GB per inch. But a combination of two unique writing methods could lead to new HDDs that pack ten times as much data in the same space. A new paper in the journal Nature Photonics outlines the process, which combines TAR (th

Continue to read more...

Batteries That Last 10 Years Developed By Hitachi

Doubling the Li-Ion battery life from 5 years, Hitachi reckons its new technology which extends the life of batteries will also cost less too—thanks to reducing the amount of cobalt used. Hitachi hopes to get them onto the production line in the next year. [Akihabara News]

Continue to read more...


JavaScript 2.0: Why Give Programmers Crutches?

A new spec on which JavaScript 2.0 will be based , should be finalized by the end of the fall. Yet most of the proposed changes do close to nothing to actually improve the language.

A lot of developers of so-called Rich Internet Applications, from widgets to online versions of desktop programs such as word processors, are very excited about this new release because it should make make it easier to just pull different nuggets of pre-produced code into their new Web-based services.

But most of the proposed changes, summarized well by Jeremy Martin, seem to act mainly as crutches for programmers in other languages (read: C# and Java) to use .

The biggest change is the implementation of true class-based inheritance, where new sets of programming objects with similar structure and behavior derive much of their functionality from previous classes of objects.

This is a change that people have been wanting for some time: You don’t have to build new combinations of data, procedures and uniqueness, for each object you might want to be used.

But it is not needed. With JavaScript, you just use another object as a prototype, clone it and then make it unique. Such prototypal inheritance can effectively mimic class-based inheritance, without creating classes, in more than one way. See Dean Edwards’ base2, qooxdoo, Prototype for a few implementations.

Most of the changes in the new specification have the same flavor as this one: they turn JavaScript into Java, an object-oriented programming language that relies heavily on classes. JavaScript, on the other hand, is more flexible in allowing the programmer to define and manipulate objects every which way. While standardizing this may sound great on paper, this is only because people have not taken the time to fully appreciate JavaScript’s prototypal inheritance.

Some of the functions that make the next rev of JavaScript more like Java are how it classifies types of values and formulas as well as how it maintains constants and namespaces. While many people prefer the programmatic rigor that these create, neither static typing (optional) or constants add serious functionality to an already well-written JavaScript program.

That last link comes from Douglas Crockford, long a proponent of JavaScript as a serious programming language to be used for more than cute image rollovers and the like.

Having spent more than 250 hours (so far; still developing) this summer programming a math and 3D rendering library in JavaScript, the dynamic and flexible nature of JavaScript’s prototypal inheritance and object model (everything is an object in JavaScript) is a practical, fundamental advantage. Why someone would want to take something so elegant and flexible and turn it into Java – which essentially forces a programmer to use classical, class-based inheritance– is beyond me.

The biggest benefit that I see is that it will lower the entry barrier into JavaScript development for folks with a classical programming background. Who knows if that’s even a good thing?

It has been said that “JavaScript is a mirror that reflects who you are as a programmer.” JavaScript is so dynamic that you can program in a step-by-step procedural manner, in a prototypal manner, or using class-based methods if implemented properly.

The upcoming JavaScript 2.0 seems to be turning JavaScript from a mirror of a programmer’s skills to a cookie-cutter method of creating unoriginal code. It replaces multiple ways of programming with just one.

Let’s hope that the release will be backwards-compatible, allowing prototypal inheritance, at least, to survive.

And programmers to stay off crutches.

If you enjoyed this post, make sure you subscribe to my RSS feed!
Tags: ,

Related posts

Other News:

Loading...