3 ms·
One cool thing we’ve lost in browsers today is the ability to switch between scripting languages. Old IE versions let you use JScript or VBScript by mentioning
by TedDoesntTalk 5y ago
One cool thing we’ve lost in browsers today is the ability to switch between scripting languages. Old IE versions let you use JScript or VBScript by mentioning the language as an attribute in the script tag. And it actually worked: you could mix different languages on the same HTML page (not necessarily a good idea but great flexibility).
Imagine if we could specify JavaScript or TypeScript in the script tag for today’s browsers?
- Cyberdog 5y agoTheoretically it could still be done, but by doing so you completely break compatibility with any browser which doesn't support it; I'm pretty sure no non-Trident-based browser ever supported VBScript. Unless some other scripting language gains wide acceptance somehow, I'll be sticking with plain ol' JavaScript for the foreseeable future.
- yjftsjthsd-h 5y agoIt's also a great way to fragment the ecosystem. Firefox supports micropython, Chrome supports TypeScript, Safari supports a subset of AppleScript, and suddenly a page working depends on browser and OS again. JS is a painful least common denominator that still varies too much, but at least it mostly is a common denominator. Edit: That said, maybe webassembly is a way forward.
- gillytech 5y agohttps://www.vugu.org/ https://www.vugu.org/ "Vugu: A modern UI library for Go+WebAssembly"
- tonyedgecombe 5y agoImagine a world where Brendan Eich had said "I can't do a good job in two weeks, just embed Python".
- laurencerowe 5y ago> Imagine if we could specify JavaScript or TypeScript in the script tag for today’s browsers? JavaScript really should follow Python’s lead here and allow but ignore type annotations. I believe TC39 already reserved the lexical space for it.
- bryanrasmussen 5y agowell that was only possible in IE, because IE used the Active Scripting https://en.wikipedia.org/wiki/Active_Scripting https://en.wikipedia.org/wiki/Active_Scripting tech, which meant that any scripting languages that implemented the Active Scripting interfaces could be used in IE, and also WScript (https://en.wikipedia.org/wiki/Windows_Script_Host https://en.wikipedia.org/wiki/Windows_Script_Host). In the implementations part of the wikipedia page https://en.wikipedia.org/wiki/Active_Scripting#Implementations https://en.wikipedia.org/wiki/Active_Scripting#Implementatio... you can see there were a number of available scripting languages for use on IE. For some reason it doesn't mention the ones from ActiveState - the current ActiveState python doesn't seem to be Active Scripting enabled but back when this technology was useful it was - maybe it just provided the python version mentioned on the wikipedia page with some extras though. on edit: added missing word.
- nieve 5y agoIn theory this was nice, but having actually dealt with it in production IE had all sorts of weird bugs with it. Mixing JScript & VBScript (much less PerlScript!) in ASP was even worse, the order of execution of the different language blocks was not specified and could change in a point release or even between installations. In practice both in the browser and on the server Microsoft's multiple language support wasn't really suited to mixing them.
- TedDoesntTalk 5y agoBut ASP pages have nothing to do with IE the browser since that was a server-side technology. I mixed JScript and VBScript without problems for a long time in an application I maintained.