Scheme as the Language of the Internet
Despite this, I’ve always been interested in the possibilities of replacing all of the above technologies with a single language: Scheme.
Scheme has basically all the features you could ever want, plus the one feature that lets you build all the rest. Further, its super-regular syntax makes it an outstanding data description language. In other words, it’s the omni-purpose DSL.
So, to randomly djinn up an example, we’d be able to do something like this*:
(link (label "Send") (style (image-src "button.png") (mouseover (image-src "button-mouseover.png"))) (onclick (lambda () (do (mysql-query (concat "INSERT INTO messages (text) VALUES (" (get-element-value 'text-box) ")")) (show-dialog "Your message has been sent")))))
There are a few things that make this not quite the Greatest Idea Ever. The first one is that I don’t think Scheme is the most pleasurable language in the world to write.
The second one only came to me recently while revisiting the idea, and it’s the really important one: why bother? Such a system would mean abandoning all of the tools and expertise out there, and all for what? Sure, it’s theoretically cool, but, even if you could mix your client and server logic with your layout and presentation, would you really want to?
* I don’t remember how to do things in Scheme at all anymore. I am probably butchering the syntax. Sorry!