I'm here at Mozilla with Dave Herman a researcher at Mozilla Research
who also sits on the standards committee for the governing body for JavaScript.
I was wondering if you might tell us a bit about changes to the language over time
or what's coming down the pike. >>Sure.
JavaScript was initially invented by Brendan Eich in a great rush.
He famously invented the first version of JavaScript in 10 days.
The original goal of JavaScript was to create a little scripting language
where people could to little things with webpages,
and I think there were people even back then who had some visions of where it could go,
but it really did start from pretty humble beginnings.
At this point, JavaScript really is the language of the web,
and the web has become note just a place for documents but a place for serious programs,
for serious applications.
As a result, the platform grows, the language grows, and the needs of the programmer grow with it.
While JavaScript started out as a simple language,
the needs of programmers aren't as simple as they used to be.
That means that there's a lot of features that other programming languages have
and JavaScript does not have that we've had to consider standardizing on.
A big one is that as your programs start to get bigger, you have needs around organization
of your programs that don't actually arise when your programs are smaller.
You may have seen as you're working with Python that Python has a module system.
It has the ability to define separate pieces of code that you put into modules,
and then you can mix and match those modules and put together larger programs
from smaller components.
JavaScript doesn't have a module system at all.
It's actually not that easy to create a library, create a piece of reusable code
that you can share with other people.
There are various idioms that people use within the language
to sort of simulate a module system, but they don't get any support from the language directly.
One of the biggest features that we've been working on for the next version of JavaScript
is a module system in some ways similar to Python's module system,
although JavaScript has some particular needs of its own.
The web has some particular needs of its own.
But it'll make it much easier for people to create reusable individual chunks of code
that they can share with each other.
Mozilla Researchの研究者である
デイブ・ハーマンさんに会いに来ました
デイブさんはJavaScriptの
標準仕様策定委員会の委員も務めています
言語における今までやこれからの変化について
話してもらえますか?
もちろんです
JavaScriptはそもそも
ブレンダン・アイクがかなり急いで作ったものです
JavaScriptの最初のバージョンを
10日で作ったことで有名です
JavaScriptの最初の目的は
小さなスクリプト言語を作って
Webページでちょっとしたことが
できるようにすることでした
当初からその先の方向性について
理解はしていたと思いますが
始まりは本当に小さなものでした
JavaScriptは最初はWebのための言語でした
次第にWebは文書だけのための場でなく
もっと重要なプログラムや
重要なアプリケーションを動かす場所になりました
Webの発展に従い言語も発達し
プログラマにとってのニーズも発達しました
JavaScriptは簡素な言語から始まりました
しかしプログラマの要求は以前ほど
シンプルではなくなりました
他のプログラム言語にあるものをJavaScriptに
標準として取り入れる必要が出てきたのです
プログラムが小さいうちは問題がなくても
プログラムが大きくなってくると
構造化関連で発生する需要があります
Pythonを使ったことがあるならば
Pythonのモジュールについてご存知ですね
コードをモジュールというパーツに分けて
それらのモジュールを組み入れて
小さな構成部品として使い
大きなプログラムを書くことができます
JavaScriptには
モジュールシステムは一切ありません
他人と共有可能なライブラリを作ったり
再利用したりすることは簡単ではありません
モジュールを模倣しようとして作られた
多くの書き方があります
しかしそれらは言語が直接
サポートしているわけではありません
次のバージョンのJavaScriptに
入れようとしている最大の機能の1つが
Pythonのモジュールのような
モジュールシステムです
JavaScriptにはそれ自体のニーズがあり
WebにはWebのニーズがあります
モジュールを使えば共有や再利用が可能な
コードを作ることがより簡単になります
Estou aqui na Mozilla, com Dave Herman, um pesquisador da Mozilla Research,
que também é membro do comitê de padronização de Javascript.
Eu gostaria que você falasse um pouco para nós sobre as mudanças na linguagem ao longo do tempo,
ou o que está para vir. >> Certamente.
JavaScript foi inicialmente inventada por Brendan Eich, em muito pouco tempo.
Ele inventou a primeira versão de Javascript em 10 dias.
O objetivo original de JavaScript era criar uma pequena linguegem de scripting,
que as pessoas pudessem usar para fazer pequenas coisas em páginas web.
E eu acho que mesmo então, algumas pessoas talvez tivessem idéia de como ela iria evoluir,
mas ela realmente começou bem modesta.
Atualmente, JavaScript realmente é a linguagem da web,
e a web tornou-se não apenas um ligar para documentos, mas um lugar para programas sérios,
para aplicações sérias.
Como resultado, a plataforma cresceu, a linguagem cresceu, e as necessidades do programador cresceram junto.
Embora JavaScript tenha começado como uma linguagem simples,
as necessidades dos programadores são mais tão simples como eram antes.
Isso significa existem que várias características que outras linguagens possuem,
e que JavaScript não tem, nós temos que considerar incluir no padrão da linguagem.
Uma importante é que, à medida que os programas se tornam maiores, você tem necessidades de organização
de seus programas, que realmente não aparecem quando seus programas são pequenos.
Você pode ter notado, quando trabalhou com Python, que python tem um sistema de módulos.
Ela provê a habilidade de se definir partes separadas de código, que você coloca em módulos,
e depois você pode juntar esses módulos e construir programas maiores
a partir de componentes menores.
JavaScript não tem nenhum sistema de módulos.
Realmente não é simples criar uma biblioteca criar um repositório de código reusável,
que possa ser compartilhado com outras pessoas.
Existem vários idiomas que as pessoas usam na linguagem,
para, de certo modo, simular um sistema de módulos. Mas eles não têm nenhum suporte da linguagem diretamente.
Uma das características mais importantes em que estamos trabalhando para a nova versão de JavaScript
é um sistema de módulos, em certos aspectos similar ao sistema de módulos de Python,
embora JavaScript tenha algumas necessidades particulares.
A web tem algumas necessidades próprias.
Mas isso tornará muito mais fácil para as pessoas criarem partes de código reusável,
que elas possam compartilhar entre si.