News for hackers. Stuff that matters.
Re:GNOME project picks JavaScript as "first class" dev language by xutopia on Tuesday February 05, 2013 @08:58AM (#5170634)
I don't understand why all the hate. Javascript is the fastest growing language right now and there is no sign of slowing down. My question is why would they pick another language over this one?
Re:GNOME project picks JavaScript as "first class" dev language by keeperofdakeys on Tuesday February 05, 2013 @09:39AM (#5170810)
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.

Re:GNOME project picks JavaScript as "first class" dev language by jiggy2011 on Tuesday February 05, 2013 @10:11AM (#5170994)
Javascript 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.

Re:GNOME project picks JavaScript as "first class" dev language by PommeDeTerre on Tuesday February 05, 2013 @06:17PM (#5173961)
It'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.

Re:GNOME project picks JavaScript as "first class" dev language by jiggy2011 on Tuesday February 05, 2013 @06:37PM (#5174053)
A 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.

Re:GNOME project picks JavaScript as "first class" dev language by keeperofdakeys on Tuesday February 05, 2013 @07:11PM (#5174168)
I 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.

Re:GNOME project picks JavaScript as "first class" dev language by keeperofdakeys on Tuesday February 05, 2013 @06:46PM (#5174082)
Web 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).
Re:GNOME project picks JavaScript as "first class" dev language by jiggy2011 on Tuesday February 05, 2013 @07:02PM (#5174145)
That 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.

Re:GNOME project picks JavaScript as "first class" dev language by tracker1 on Tuesday February 05, 2013 @12:08PM (#5171751)
You compare it to Python, then complain about weak typing?
Re:GNOME project picks JavaScript as "first class" dev language by correnos on Tuesday February 05, 2013 @02:53PM (#5172844)
Python 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]'.
Re:GNOME project picks JavaScript as "first class" dev language by tracker1 on Wednesday February 06, 2013 @01:01PM (#5177824)
Javascript 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?

Re:GNOME project picks JavaScript as "first class" dev language by keeperofdakeys on Wednesday February 06, 2013 @08:29PM (#5179984)
While 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.
Re:GNOME project picks JavaScript as "first class" dev language by correnos on Wednesday February 06, 2013 @10:08PM (#5180284)
It'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.
Re:GNOME project picks JavaScript as "first class" dev language by correnos on Wednesday February 06, 2013 @07:28PM (#5179819)
> 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.

Re:GNOME project picks JavaScript as "first class" dev language by VeejayRampay on Tuesday February 05, 2013 @04:40PM (#5173417)
Maybe because Javascript achieved that growth and subsequent ubiquity not on its technical merits but because and only because it was the de facto language of the web (and still is to this day for a reason that still eludes me).

Funny how the number of languages a programmer can pick from is growing every day, but on the one HUGE platform that is the web, it's Javascript or nothing. And by funny, I really mean extremely annoying and a severe regression.

Re:GNOME project picks JavaScript as "first class" dev language by psionski on Tuesday February 05, 2013 @09:42AM (#5170822)
Bamboo is also very fast-growing, but we don't use it for desktop application development. We use it for making huts, preparing food and treating infections.

I guess my point is that growth doesn't matter when it's in another sector.