Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so I am trying to learn front-end programming. Trying to figure out how javascript is a pain, and various projects (GWT, Coffeescript, Capuccino's objective/j...) are trying to fix this with languages that compile to JS.

What would you do if you were to reinvent the browser?

I think I would embed a VM rather than a language (quite like Java applets except less complex and with a DOM API instead of a canvas and self-contained environment).

I suppose this has been suggested many times, but I cannot find resources on this, and most of the embedding tutorial I stumble on address embedding languages (guile, lua, python, whatever).


share|improve this question
Nowadays Javascript is pretty much a virtual machine on its own. – SK-logic Sep 12 '11 at 10:55
up vote 1 down vote accepted

An embedded language IS an embedded virtual machine, and vice versa. Each has a defined interface to the browser, each has a defined user interface (syntax or instruction set or call it what you will).

If I were going to reinvent the browser, and provide a language for extensions, I would provide a LISP. Most probably, I would look at a LISP based on GNU Emacs LISP (possibly GUILE?), because that particular LISP had certain scope and binding design decisions resolved in ways that allowed extensions to interoperate.

Why LISP? In my personal opinion, LISP does some things easily that other languages do poorly or not at all. It is perfectly feasible to compile procedural (more limited) languages to LISP, but, if you hit some of the corner cases, it can be very difficult to compile LISP to, say, C.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.