3 ms·
It's kind of funny that once upon a time, in the early days, there was actually a language attribute to the script tag and at least one browser actually support
by stormbrew 14y ago
It's kind of funny that once upon a time, in the early days, there was actually a language attribute to the script tag and at least one browser actually supported embeddable languages.
Sure, it was an embrace-and-extend move, but I'm not sure it was a bad idea even so.
- ricardobeat 14y agoThe `type` attribute is still there, it only fallbacks to javascript if not set. Nothing besides common sense prevents browsers from shipping with type="text/ruby" support as done here. It's just not a very good idea.
- stormbrew 14y agolanguage was a different attribute pretty much only used by IE and its ActiveX language embedding (which was pretty much only ever used for VBScript). What I'm getting at in a somewhat snarky and roundabout way is that VBScript killed multilanguage support in browsers.
- ricardobeat 14y agoWell, I don't think that holds any water. Multi-language support wasn't and still isn't a good idea; having one good toolchain and cross-browser environment is already a huge effort and far from done, supporting multiple languages would just fragment the ecosystem and slow down progress. There is hardly any popular language today you could embed and get better performance than JS anyway, except for Lua, which barely qualifies as 'popular'. Meanwhile there are a hundred cross-compilers/transpilers out there that give you the kind of syntax you want, without requiring a ton of changes in browsers.
- jstclair 14y agoErik Meier & co used it to enable Haskell as a scripting language (in 1998!). See his "Confessions of a used programming language salesman", HaskellScript PDF: [http://research.microsoft.com/en-us/um/people/emeijer/papers/icfp06.pdf http://research.microsoft.com/en-us/um/people/emeijer/papers...]
- flywheel 14y agoThose who remember the hell that was VBScript in the browser, know that having support for more than one front-end language is not such a good thing. Web developers have benefited from having javascript as the only language supported by browsers. Language fanboys might bash javascript, but there are many examples of the great things that can be achieved with javascript that make them look really quite silly, and every language has its pitfalls. Javascript is not a bad language, but it is misunderstood and people who misunderstand it are the most vocal detractors. Opening up the browser to many languages causes the tower of babel all over again. Now front-end devs won't just be required to be a "javascript ninja", they will now have to master many other languages in addition to all of the DOM wackiness that comes with supporting multiple browsers. It's all just too much.
- pjungwir 14y agoIn the early days of the web I worked at a dev shop where we used <script language="perl"> (or python, or a couple others) for server-side templating. It was a pretty nice system, actually.