Please do not dismiss the idea right away. I know that it is hard to compete with a mainstream approach that already works (mostly), so my question is partly "academic".
I also am aware that ClojureScript exists and is very cool, but it is a patch on an existing ugly thing, a useful abstraction.
Disclaimer: I am a programmer but not a web developer, and this is why I am soliciting other's feedback. Being a developer and using the web every day and reading up on various topic and viewing the html source of a page from time to time I think I have some idea about web development.
Anyhow, the problems as I see them:
- The web started out quick and dirty and noob-friendly, but now it takes a great deal of skills to make a good modern interactive web page, and you just have to be good at it in order to be competitive today. This often means that quick and dirty "learn web in 21 days" just does not cut it at all.
- Html started out quick and dirty, as a noob-friendly protocol. It is currently a mess.
- CSS appears to be a decent attempt to clean things up. It is worth keeping, at least the idea of it - that you can style the appearance in a separate file.
- The demand for what the web could do today is ever-increasing; Google's ChromeBook is a manifestation of that. You run a browser full screen and everything that you might want to do - keyboard/mouse interactions, sound, video, games, text, images, power point presentations - everything is happening inside of it. Thanks for the fast browsers and fast computers and "the cloud", but it could be a lot better!
If you start from scratch and realize that it is pretty much just a canvas to be painted, then I think the browser can be much smaller and simpler. The price to pay is having to write a valid program for everything in a funky syntax such as Lisp or Clojure, even for the simplest of things such as displaying a label. That used to be the cool part of the html - if you wanted just to type the paragraph, you would type it verbatim. This rarely happens anymore. If all you want is to just type the paragraph of text, you still have to think about inline or CSS styling, placement. The following piece of HTML (found on the front page of this site)
<a href="/questions/tagged/programming-languages" class="post-tag" title="show questions tagged 'programming-languages'" rel="tag">programming-languages</a> <a href="/questions/tagged/learning" class="post-tag" title="show questions tagged 'learning'" rel="tag">learning</a>
is not that much easier to craft than some alternative Lispy syntax (and I have not put that much thought into it):
(create-link :target "/questions/tagged/programming-languages" :class "post-tag" :title "show questions tagged 'programming-languages'" :rel "tag" :content (text "programming-languages"))
This might not be a valid Clojure syntax; I sort of made it up. It does not have to try to mimic html - in fact that is the point of starting from scratch. The huge advantage here would be that
(text ...) and
(create-link ...) are not part of the core language that a browser would have to understand. The browser would only need to understand a "safe" Clojure (one that cannot wipe your hard drive clean) and be able to draw and play music and listen to keyboard and mouse and similar things, and everything else - drawing text, playing a video, displaying a combo box and interacting with it would be all done in a carefully designed library.
Why did I choose Clojure? It is a tiny language that can accomplish a lot, plus the philosophy of building complicated programs out of simple building blocks is very attractive.
Somewhat of a tangential discussion - I think the same is true for LaTeX - it could be redone with Clojure as an underlying language, and a source file would be a full-blown program that spits out a PDF or a ps as it executes.
I understand that starting from scratch is VERY HARD because a modern browser has lots and lots of useful features. Starting with a clean base can pay off though.
What are your thoughts on this crazy idea? I realize that the answers would probably be subjective due to the nature of this question, but I still am curious what you think of this.