Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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).

Thoughts?

share|improve this question
2  
Nowadays Javascript is pretty much a virtual machine on its own. –  SK-logic Sep 12 '11 at 10:55
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.