The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Brendan Eich on JavaScript's Future

2 replies on 1 page. Most recent reply: Jun 27, 2008 12:16 AM by Rinie Kervel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Brendan Eich on JavaScript's Future Posted: Jun 23, 2008 8:52 PM
Reply to this message Reply
Advertisement

Likely the most widely-used programming language—considering the numerous Web pages that include it—JavaScript has been a black sheep of a programming language: While developers increasingly use it in Ajax applications, its idiosyncrasies and buggy implementations are the subjects of constant ridicule.

The committee to standardize the next-generation JavaScript, interchangeably called ECMAScript 4 and JavaScript 2.0, has as its goal to solve many of the language problems that persisted since JavaScript 1.0 was released in the Netscape browser some thirteen years ago. In a wide-ranging interview with InfoWorld, JavaScript Creator Ponders Past, Future, JavaScript creator and current CTO of the Mozilla Foundation, Brendan Eich, discusses the specific design goals for JavaScript 2.0.

One of those goals, according to Eich, is to support development and maintenance of large-scale applications while also preserving JavaScript's roots in scripting languages:

We in our new fourth edition of the ECMA standard are specifying what the version numbers people use on various designators mean. We’re saying that JavaScript 2 and ECMAScript 4 mean the same thing. There’s no value-add, there’s no feature sneak. JavaScript 2 and ECMAScript 4 are equated...

We’re trying to address programming in the large, because no one thought JavaScript would be used at the wide scale it is. Not just reaching lots of people on the Web, but large applications like Gmail...

To write large code, you don’t just want this little snippet language that I made easy for beginners to start buying by the yard. You want strong APIs, ways of saying -- this is my module and this is your module and you can throw your code over to me and I can use it safely.

To do that, you need more than is in the current third edition of the language. You need some kind of a way of talking about the types of values, some way of talking about interfaces or the arguments that can go into a function in the result and come back. Can they be of any type? Can they be of the wrong type? Or can they only be of certain types?

We’d like to be flexible about this and not make things painfully static in a fixed way like Java does. We’d like to say, "Here’s the patterns people use in their code today. Here are the latent types they use for their data. Their data types look like these JSON objects, these trees of data." We can write down very concise descriptions of those in the fourth edition using the [type] system, and then you can have the implementation automatically check that the shape of the data matches. So you can make sure that somebody isn’t sending you the wrong data by accident or maliciously -- you can make sure that certain names can’t be changed to mean something other than what they should mean...

It doesn’t mean everything gets locked down; it’s still JavaScript. You can start buying by the yard, you don’t have to declare the type of any variable. You can just start writing code and snippets.

In the interview, Eich points out that JavaScript needs to interoperate with a very broad set of host environments, and that JavaScript code needs to maintain its portability in spite of that diversity:

Ruby and Python and Perl have had great community, open source community development over the years where they don’t have to worry about being in every browser and working on arbitrary Web pages across billions of Web pages. Instead, they can say, "Here’s the new version, port your code." They can bind very tightly to the operating system, which are the server APIs. So they can be really tight and useful and very powerful in their domains, but their domains don’t have to have code-sharing in the same ubiquitous way that Web pages are shared.

JavaScript’s the only language that is so widely interoperable. When you take a Python script written for Linux, it uses certain system calls or certain library code to do process management or input/output. Porting that to Windows means changing some of the code. You don’t have the same API in all operating systems. Whereas with JavaScript it’s got to be the same everywhere because browsers don’t care about operating systems.

Eich also talks about ScreamingMonkey, a project to enable IE 7 to execute next-generation JavaScript code, as well as about JavaScript's background at Netscape.

What do you think about Eich's comments regarding JavaScript 2.0's design directions?


Jiri Goddard

Posts: 54
Nickname: goddard
Registered: May, 2007

Re: Brendan Eich on JavaScript's Future Posted: Jun 25, 2008 4:18 PM
Reply to this message Reply
They should look to AS3 and maybe learn from it.

Rinie Kervel

Posts: 26
Nickname: rinie
Registered: Oct, 2005

Re: Brendan Eich on JavaScript's Future Posted: Jun 27, 2008 12:16 AM
Reply to this message Reply
> They should look to AS3 and maybe learn from it.

They did
http://hecker.org/mozilla/adobe-mozilla-and-tamarin

Flat View: This topic has 2 replies on 1 page
Topic: Brendan Eich on JavaScript's Future Previous Topic   Next Topic Topic: Jim Baker on Realizing Jython 2.5

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use