7 ms·
Javascript became the language of the web because it was there, and people adapted. While it may be secured in the web, I think it's a mistake to pick such a, f
by keeperofdakeys 14y ago
Javascript became the language of the web because it was there, and people adapted. While it may be secured in the web, I think it's a mistake to pick such a, for lack of a better term, horrible language for programming on the desktop.
As a language, javascript feels less complete when compared to other languages (like python). The weak-typing is especially bad, leading to inconsistent results. More time/effort is then required to write a good application, which I think is unacceptable.
- jiggy2011 14y agoJavascript has the advantage that most of the millions of web devs out there have used it or a language that compiles to it at some point. By comparison python is a relatively niche language. It also has the advantage of allowing web devs to port their web code over easily to a desktop app.
- PommeDeTerre 14y agoIt's best to keep those kind of developers isolated to the web, and away from important, widely-used software projects like GNOME. I think a lot of the problems with GNOME 3 were due to web developers and designers getting involved, bringing in some dumb philosophies, and making decisions that were quite terrible. Things were much better when it was C programmers doing the bulk of GNOME's design and implementation.
- jiggy2011 14y agoA lot of web developers are working on things that are more widely used than gnome. This seems roughly equivalent to saying "This platform should only have applications written by neckbeards for neckbeards" I think if this brings programmers who would not traditionally target Linux desktop to target gnome that is a good thing. if their apps suck it should be straightforward to avoid them.
- keeperofdakeys 14y agoI do agree that unix/linux was full applications written by neckbeards for neckbeards at one point. The push to have applications that are more usable is good. The problem is they have taken this too far, and the programs and DEs that are being created now are truly annoying to use, and harder to learn for anyone. I think the biggest problem is that everything is being written for "The N00b". I don't think anyone has a very clear picture of who this person actually is, so they cut back functionality and UI elements to try to make it more friendly for this person. What you end up with is a DE like Gnome Shell, that is significantly different to what many people are used to, and takes longer to learn how to use. I also think many developers wouldn't actually use some of their applications, which leads to many more problems. There was a talk at an Australian linux conference recently where a speaker told the story of how he had tried to use evolution, but came across many bugs. After talking to the developers, he found that none of them used/tested the features he was using, so these kind of bugs can popup without soneone fixing them.
- keeperofdakeys 14y agoWeb applications are built around the DOM, using onClick methods and many other "web-only" apis. They can not be easily ported without almost a total rewrite, so you may as well use a different language. I also think that recommending a different language is better then recommending javascript, even if that's all the person knows (naturally I'm not suggesting they remove javascript support).
- jiggy2011 14y agoThat will depend on the application in question and how much of the code is directly related to the GUI. All of the business logic , AJAX requests etc should be fairly reusable. I know there have been plenty of times building web apps where I have had to maintain separate front-end and back-end code in different languages that does exactly the same thing. Time can also be a factor, if you are already maintaining a web client , a mac client in obj-C and possibly an android Java client having to learn yet another language and ecosystem is probably not what you want.
- tracker1 14y agoYou compare it to Python, then complain about weak typing?
- correnos 14y agoPython is dynamically typed, but it is still strongly typed. It throws type errors consistently when you try to do things that don't make sense. Contrast with Javascript, where {} + {} is '[object Object][object Object]'.
- tracker1 14y agoJavascript when doing operations between to variables will try to coerce them into the strongest type that both support... in your example that is String, in this case ({}).toString() == "[object Object]" ... which is why you get the result. Your not understanding how a system works is not an error in the system. What would you expect in your example? A deep copy/merge, a shallow copy/merge... right merged with left and result returned?
- correnos 14y ago> what would you expect? I expect a type error, like I said before. Implicit coercion between types is the definition of weak typing, and is part of what separates Python from Javascript.
- keeperofdakeys 14y agoWhile the results are definitely deterministic, and play by a set of rules, most people don't bother learning these rules. This can lead to bugs in programs, if people do not take proper care. Since weak-typing doesn't give me any features, and could be a source of bugs in my program, I prefer to use languages that don't use it.
- correnos 14y agoIt's not even an issue in languages (C) that don't strongly type for performance reasons, or because you get closer hardware access as a result (though these count as features themselves). The problem is that in Javascript, you don't get either of these -- there's no benefits, there are only new bug vectors. This wouldn't be as big of an issue if the default coercion behaviour was generally helpful, but it's not. It's just a pain.