2 ms·
People with experience dealing with large-scale software development have been pointing out this flaw with JavaScript for years. It's clear that it just doesn't
by PommeDeTerre 14y ago
People with experience dealing with large-scale software development have been pointing out this flaw with JavaScript for years. It's clear that it just doesn't support modularity properly, and there are severe consequences to this.
Yet there have still been those JavaScript developers who insist that it's a good language to use for anything beyond small (that is, a few lines of code) scripts. They go right ahead creating large amounts of extremely unmaintainable code.
I don't think the solution is to extend JavaScript. Realistically, the only sensible thing to do is to discard JavaScript for anything serious. Sure, maybe the language being used instead will compile down to JavaScript and try to fake properly modularity support, for instance, but this should only be a temporary measure.
All I think it would take is for a major player, like Google or Mozilla, to embed a more capable programming language in their browser. Python, for instance. It's has decent support for modularity, and has been proven with very large systems, yet it still offers the benefits of a scripting language.
The situation wouldn't improve over night, but after a few years we'd likely see Python support in the other major browsers, even if it's just the open source ones, and Opera. These days, that'd likely be enough to gain some good traction. Then we'd at least have a viable option for large-scale, client-side scripts within the browser. It'd be a far better situation that what we've got with JavaScript currently.
- kevincennis 14y agoCall me crazy, but I think adding modules to JavaScript seems a little more pragmatic than entirely discarding it in favor of Python. Also: http://wiki.ecmascript.org/doku.php?id=harmony:modules http://wiki.ecmascript.org/doku.php?id=harmony:modules
- VMG 14y agoespecially if imports over http in a browser aren't a solved problem in Python either and would also require language extensions