Wednesday, 22 June 2011

Why No Alternatives to JavaScript?

This is a question whose answer I can't find.

When you put some JavaScript in a web page, you use this syntax:

<script type="text/javascript">
    document.write("Hello World!")
</script>

You explicitly state that this is JavaScript.

It's been 16 years since JavaScript was invented. Why have no alternative languages been developed and added to HTML? Clearly HTML allows for the possibility. JavaScript is a language created in ten days, launched without time to go through a "are we really doing this a good way" phase. Hence there are several bad things in JavaScript. An more rigorously developed alternative would be valuable.

CoffeScript exists. But this must be compiled into JavaScript before adding to a web page.

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.