Links on LtU
posted on 2005-04-14Here’s one of my post on LambdaTheUltimate, about Links initiative :
I agree there is room for a new language in the Web area.
Current solutions are :
- PHP / Perl : dynamicly typed programming languages. It’s possible to build big applications with them but they tend to break easily. More important : they’re very slow, and cost a lot of server CPU
- Java : using JSP or Java Server Application have some good points : you learn how to think your website in terms of application, it helps to structure your program, and give you some typing. However the Java type system an VM are far from flexible, and so you need to go through a lot of high-level wrappers generated in order to hide all the SQL/XML/… job done behind. Additional typing turns then into a pain, and all theses technologies together are too much heavyweight for small to medium websites.
- Ruby/Rails , Python+Zope : didn’t investigate theses ones so much, they are also dynamic and not famous for performances
That’s why I end-up developing my own platform. I had already a fast and lightweight virtual machine, a compiler for a small dynamicly typed scripting language (MotionScript), and a high level functional+OO language with type inference (MotionTypes) which we use to develop Flash contents. All I had to do was to write a MotionTypes -> MotionScript code generator, to put the VirtualMachine into a “mod” for Apache and to add the binding for MySQL, some system commands, and some access to Apache API. And it’s now running very well.
I think that the following approachs will be successful :
- focus on “website-as-application”, not as a bunch of scripts : build a single binary for deployment
- have a two-steps compilation approach : from one high level language to a low level one, then to bytecode/JIT/native, this will ease 3rd party development for additionnal tools/DSL in your web framework
- don’t try to solve all the problems at the same time. First focus on some specific point (for me it was typing and performances) and then add features after it has proven usable. My next target is database integration, but I should keep a low-level SQL bindings since some users might not want to do the “Big Jump” and learn all theses new technologies at one time.
I somehow agree with Xavier Leroy slides. In general, language designer are theorists and should focus on languages where the theory is important. A web programming language is more about standards, apis, and technology. It might be more successful in handled by engineer people (no offense to theorists people, they make most of the time very good engineers too).