4 ms·
What would JavaScript bring that Lua does not?
by bsg75 14y ago
What would JavaScript bring that Lua does not?
- greggman 14y agoAs pointed out, you can't run Lua in the browser. It would be nice to have articles like this in Wikipedia. http://tests.web2py.com/physics2d/default/code/10 http://tests.web2py.com/physics2d/default/code/10 That points out that arguably Wikipedia will eventually have to allow JavaScript in pages it serves if it wants to progress. When that happens there will now be 2 code bases. The Lua code that generates pages and the JavaScript code that does interactive examples for articles. So the question is, why have 2 language which requires twice as many libraries, twice as much knowledge, twice as much expertise, and various glue to get them to interact with each other, vs having 1 language used for both?
- bsg75 14y ago> So the question is, why have 2 language One perspective: Because choosing a language because it is conveniently in place should not be the primary reason. Many people are comfortable with JavaScript, but there are many server side code bases in other languages because they are preferred for various reasons. There is a large amount of PHP code deployed, but there does not seem to much drive or concern that it does not run in browsers. Both JS and PHP earn a large amount of negativity because of their shortcomings (which we don't need to go into here), and they are obviously not the tool for every job. I would simply make the point that choosing a language to avoid having to learn more than one is not an approach for improvement. Otherwise as I said in another post, we would all be using IE with ActiveX controls.
- greggman 14y agoMany companies limit the number of languages used internally. There are both positives and negatives of course. The biggest positive though is that it makes it easier for programmers to understand code written by other programmers. It also means code written by one programmer will be usable by other programmers. If the code is in a different language then both of those are often false. The 2 programmers don't speak the same language and even if they both happen to understand both languages they can't share code.
- CamperBob2 14y agoA user base, for one thing.
- bsg75 14y agoWhich is the case for all technologies at one time. With that line of thinking, we would all be using Internet Explorer. JavaScript did not birth with a fully formed userbase.
- CamperBob2 14y agoBut the fact is that JavaScript does have a fully formed user base now. The whole idea behind this effort is to facilitate contributions to Wikimedia from a diverse set of (presumably busy) contributors, correct? If so, what's the point in making them learn a new language in order to contribute, when an existing well-known language is a perfectly reasonable fit? Sounds like someone had a Lua hammer, so everything looked like a Lua nail.
- borntyping 14y ago> Sounds like someone had a Lua hammer, so everything looked like a Lua nail. Same could be said for most of the JS proponents in the thread.