2 ms·
What properties would a new language make an interesting alternative? What common problem suffers the most solved in js? Preferably something without hope for
by 6510 5y ago
What properties would a new language make an interesting alternative?
What common problem suffers the most solved in js? Preferably something without hope for improvement.
- krapp 5y agoGiven how practically all Javascript nowadays is generated by Typescript or other compile-to-js languages, probably a stricter type system, actual integers and doubles (JS only uses floats,) maybe as often mentioned, a bigger standard library. There probably isn't much benefit to different languages if you're just manipulating the DOM (which is probably why that model failed, having more than one language doing the exact same thing is needless extra complexity) but using the browser as an application runtime opens up the possibility of making any software written in a supported language accessible and executable from a URL. The "JS as bytecode" model got us surprisingly far, but it was a disgusting hack, and Java applets and Flash had their day in the sun, but Webassembly is probably what's going to make the "multiple scripts in the browser" model eventually feasible.
- 6510 5y agoThinking about it there are so many angles from which one could approach it. It could not be required to run the script. For example require the visitor has his own website and have the script interact with specified tools installed there. Or a very limited language that disables js for security. It could be a highly readable DSL, for example something to write interpreters in. Or something narrow like interact with a rich text editor or data visualizations. Perhaps a basic game engine.