Reitter: Answering the question: "How do I develop an app for GNOME?"
It's critical that everyone understands this decision as a plan to elevate the language, bindings, tools, and documentation to a level of quality we have not yet achieved. It is not a decision to abandon any other language bindings. We will continue to distribute other bindings and documentation as we do now and compatibility for the other languages will continue to be developed as they are today by the developers involved with those modules."
Posted Feb 5, 2013 16:41 UTC (Tue)
by heijo (guest, #88363)
[Link] (84 responses)
I mean, the only reason to adopt JavaScript is that it is popular due to the web, since it is otherwise a poor language, but then why not apply the same reasoning to preferring HTML to GtkBuilder XML?
What's the point of having system-specific desktop UI libraries when you can do everything either with portable web APIs, or with portable low level APIs like OpenGL?
Also, as a side bonus, the GNOME and KDE projects could eventually be completely eliminated, finally solving the community divisions and incompetence issues they have.
Posted Feb 5, 2013 16:44 UTC (Tue)
by bronson (subscriber, #4806)
[Link] (7 responses)
Posted Feb 5, 2013 16:54 UTC (Tue)
by HelloWorld (guest, #56129)
[Link] (1 responses)
Posted Feb 5, 2013 16:59 UTC (Tue)
by mpr22 (subscriber, #60784)
[Link]
The rest of the comment might well be legitimate, but the paragraph I've quoted here takes it firmly into "lives under a bridge snacking on goats" territory.
Posted Feb 5, 2013 16:59 UTC (Tue)
by amtota (guest, #4012)
[Link] (4 responses)
The lesson has not be learnt yet. And I find that even more worrying that the technology issues.
Posted Feb 5, 2013 19:54 UTC (Tue)
by Frej (guest, #4165)
[Link] (1 responses)
Posted Feb 5, 2013 21:34 UTC (Tue)
by nix (subscriber, #2304)
[Link]
Posted Feb 6, 2013 6:30 UTC (Wed)
by bronson (subscriber, #4806)
[Link] (1 responses)
I just don't want to see obvious flamebait floating around on LWN.
Posted Feb 6, 2013 14:51 UTC (Wed)
by ovitters (guest, #27950)
[Link]
Posted Feb 5, 2013 17:19 UTC (Tue)
by FranTaylor (guest, #80190)
[Link] (60 responses)
There can be endless debate over which language is better. It's never going to end. And you certainly aren't doing yourself any favor by just throwing out unsubstantiated opinions.
The stated intention was to pick a language with traction that they could stick with, one that is already familiar to people and doesn't need a sales pitch or a learning curve, not pick an obscure upstart "perfect" language that dies on the vine.
Posted Feb 5, 2013 17:23 UTC (Tue)
by FranTaylor (guest, #80190)
[Link] (56 responses)
Posted Feb 5, 2013 18:32 UTC (Tue)
by oldtomas (guest, #72579)
[Link] (37 responses)
If it only were true. For one thing, they forgot "let", thus leading to quite "interesting" constructs. And since they forgot macros too, there's no help available.
No. JavaScript's core is fine, but it was frozen too early. One of the biggest failures of all things Web: no backtracking in the design process. Things get thrown out while still immature and when there'd be a chance to fine-tune, everyone and its Microsoft are actually using it and would rise a stink if anything changed.
A sad state of affairs, IMHO.
Posted Feb 5, 2013 19:39 UTC (Tue)
by khim (subscriber, #9252)
[Link] (25 responses)
Not even close. > test = Array(8, 9, 10) Looks logical? Let's fix it: > test.sort(function(a,b){return a-b})
Cool. What about strings? > test = Array("8", "9", "10", "b", "a") Hmm... That's strange. Looks like we'll need to check types of variables. Can we at least compare few variables? > a = 10 Apparently not. Can we at least compare two? > a = "a" Looks like the answer is still "not". And final example. test = "Hello" Can you understand WFT goes on here and why the following fix works? j = 0; for (i in test) j-=-i; j PHP is known as fractal of bad design but JavaScript is close second. It's not even close to scheme in this regard: scheme is sane language JavaScript and PHP are not.
Posted Feb 5, 2013 21:38 UTC (Tue)
by nix (subscriber, #2304)
[Link] (1 responses)
Posted Feb 6, 2013 8:21 UTC (Wed)
by osma (subscriber, #6912)
[Link]
Posted Feb 5, 2013 22:25 UTC (Tue)
by smokeing (guest, #53685)
[Link]
One can indeed live a long, happy and rich life as a programmer and have no regrets at the end -- all without knowing what JavaScript is.
Posted Feb 6, 2013 0:03 UTC (Wed)
by FranTaylor (guest, #80190)
[Link] (8 responses)
"Look at me, I can create create syntactic constructs that seem to make no sense! Wow how clever is that?"
Posted Feb 6, 2013 6:09 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (7 responses)
Thanks in advance.
Posted Feb 6, 2013 15:12 UTC (Wed)
by randomguy3 (subscriber, #71063)
[Link] (6 responses)
Not that I don't think that JS is a bit mad in places, or that functional languages aren't a good thing, mind. I just think your examples were somewhat disingenuous.
Posted Feb 6, 2013 15:37 UTC (Wed)
by adobriyan (subscriber, #30858)
[Link] (4 responses)
Sane programming languages do not have this property.
Posted Feb 6, 2013 15:53 UTC (Wed)
by mpr22 (subscriber, #60784)
[Link] (3 responses)
"a <= b" and "b <= a" being simultaneously true is fine because of the '=' part; I presume you mean that "a < b" and "b < a" being simultaneously true is indicative of a problem (which it is). On the other hand, "a <= b" and "b <= a" being simultaneously false is sometimes compulsory (IEC 60559 floating point requires that all comparisons involving NaNs, including comparing a NaN to itself, return false.)
Posted Feb 6, 2013 19:05 UTC (Wed)
by JoeBuck (subscriber, #2330)
[Link] (2 responses)
Posted Feb 6, 2013 19:13 UTC (Wed)
by drag (guest, #31333)
[Link] (1 responses)
Especially the parts about using great-than and less-than to compare strings. Trying to program this way seems broken no matter what the language.
Posted Feb 7, 2013 9:25 UTC (Thu)
by micka (subscriber, #38720)
[Link]
Posted Feb 6, 2013 20:34 UTC (Wed)
by khim (subscriber, #9252)
[Link]
Of course the examples made no sense! That's exactly the point! You see, there are statically typed languages (Java, with some limitations C/C++, etc: if you don't use floating point values you are pretty safe there): errors like these will be detected at compile time and you'll fix them before program will be even started for the first time. There are dynamically typed languages (Lisp, Python, etc): errors like these will be detected at runtime and end-user will see cryptic error message - embarrassing, to be sure, but not the end of the world. And finally there are languages like PHP or JavaScript: errors like these will be detected when your applications it cracked and is happily sending spam all over the internet (or, alternatively, when your credit card info is stolen and your account is emptied). Yes, JavaScript [...] [is] surprisingly good considering the speed at which it was created, I fully agree. It's still a crazy language which would never be used for anything serious in a better world. In our world it must be avoided as much as possible: there are cases where you are forced to use it, but there are no need to propagate this insanity further then necessary.
Posted Feb 6, 2013 2:00 UTC (Wed)
by waucka (guest, #63097)
[Link] (1 responses)
Posted Feb 6, 2013 2:01 UTC (Wed)
by waucka (guest, #63097)
[Link]
Posted Feb 6, 2013 9:15 UTC (Wed)
by epa (subscriber, #39769)
[Link] (1 responses)
Posted Feb 6, 2013 19:27 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
Posted Feb 6, 2013 11:04 UTC (Wed)
by canatella (subscriber, #6745)
[Link] (7 responses)
int add(int a, int b) { return a + b; }
has undefined behavior due to a possible signed integer overflow.
If you read the ecmascript spec, you'll see that the language behavior is well defined. Fyi, the <= operator is explained at 11.8.5. It's all clearly documented.
Posted Feb 6, 2013 20:16 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (5 responses)
>Fyi, the <= operator is explained at 11.8.5. It's all clearly documented.
Posted Feb 6, 2013 21:11 UTC (Wed)
by renox (guest, #23785)
[Link] (4 responses)
Yes, well known as it has created quite a few security vulnerabilities!
Javascript's craziness doesn't excuse C's own craziness: undefined behavior for integer overflow by default is a *premature optimization*..
Posted Feb 6, 2013 22:00 UTC (Wed)
by k8to (guest, #15413)
[Link] (3 responses)
It's sort of a crazy language to the programmer but the cause is not premature optimization, but rather an attempt to be a very thin layer of helpful syntax over the system's native behavior. Since systems behave differently, you don't know what will happen, so it's undefined.
You can argue this was a bad design goal, but that's a different kind of error.
Posted Feb 7, 2013 6:00 UTC (Thu)
by khim (subscriber, #9252)
[Link] (2 responses)
If systems behave differently then it begs for “implementation-defined behavior”, not for “undefined behavior”. Much simpler and safer to deal with these. Indeed, the fact that C has so many “undefined behaviors” is a premature optimization - but the fact that someone made such error many years before is not an excuse to propagate this madness in newer, more modern languages.
Posted Feb 7, 2013 9:24 UTC (Thu)
by ncm (guest, #165)
[Link] (1 responses)
Posted Feb 7, 2013 11:46 UTC (Thu)
by khim (subscriber, #9252)
[Link]
You assume people write program to the spec. Well, newsflash to you: they don't. The very fact that both GCC and LLVM are trying (and failing) to catch a lot of undefined behaviors shows that people don't write to the spec. People write code, they write tests, if they pass - they are happy. That's it. If program triggers implementation-defined behavior then tests are usually enough to catch problems (because compiler may do different thing from what the programmer expects but it consistently does different thing) while with undefined behavior compiler is absolutely free to do one thing in one case and completely different thing in another case. Which means that program may suddenly crash after compiler upgrade - and you have no idea why.
Posted Feb 8, 2013 14:41 UTC (Fri)
by jwakely (subscriber, #60262)
[Link]
No, the possibility of overflow does not make adding two integers undefined. It only has undefined behaviour if the overflow actually occurs.
Posted Feb 6, 2013 13:49 UTC (Wed)
by sorpigal (guest, #36106)
[Link]
# php
print foo()[0]; // SYNTAX ERROR. Intermediate variable required.
// JS:
The difference in levels of crazy is impossible to under-emphasize!
There are a lot worse languages than JS. PHP is inescapably broken and thoroughly unsalvageable without creating what is effectively a brand new language. All JS needs is typing, a package or module system, and maybe some improvements to its standard library. Its other flaws are no more serious than those of pick-your-favorite-language.
The main issue with JS is that for a long time serious programmers ignored it and as a result it was only used by the ignorant and the short sighted. The second worst problem with JS is the DOM, which really has nothing to do with it. The third is that a lack of packages has made large and inter-connected JS code pointlessly painful. I fail to see what of any of this is as intractable as PHP's broken type system, broken object system, broken parser, etc., etc..
So, please, bash JS all you like, but don't be vulgar and bring PHP in to it.
Posted Feb 5, 2013 20:02 UTC (Tue)
by Frej (guest, #4165)
[Link] (2 responses)
Posted Feb 6, 2013 0:18 UTC (Wed)
by HelloWorld (guest, #56129)
[Link] (1 responses)
That said, I wouldn't like to program in scheme either. Syntax does matter and I also want a good static type system.
Posted Feb 6, 2013 0:36 UTC (Wed)
by hummassa (subscriber, #307)
[Link]
> (f (let ((a 0)) a))
in javascript is written like
> f( (function() { var a = 0; return a })() )
and it works.
Posted Feb 6, 2013 0:24 UTC (Wed)
by HelloWorld (guest, #56129)
[Link] (1 responses)
Posted Feb 7, 2013 20:50 UTC (Thu)
by oldtomas (guest, #72579)
[Link]
Posted Feb 6, 2013 10:00 UTC (Wed)
by canatella (subscriber, #6745)
[Link] (5 responses)
https://developer.mozilla.org/en-US/docs/JavaScript/Refer...
Posted Feb 6, 2013 10:38 UTC (Wed)
by canatella (subscriber, #6745)
[Link] (4 responses)
Posted Feb 6, 2013 17:28 UTC (Wed)
by HelloWorld (guest, #56129)
[Link] (1 responses)
Posted Feb 8, 2013 2:24 UTC (Fri)
by idupree (guest, #71169)
[Link]
(I didn't know that until I read the MDN page linked above.)
I think JS compatibility is the reason people aren't using it; even V8 doesn't like that syntax (tested in Chromium JS console and node.js REPL).
Posted Feb 7, 2013 20:57 UTC (Thu)
by oldtomas (guest, #72579)
[Link] (1 responses)
How's it that people is still using (function (foo) {blah blah}) (42)? Inertia?
Note that I *do* understand the construction, having read SICP, but then I'd take Scheme over Javascript any day).
Posted Feb 8, 2013 4:02 UTC (Fri)
by mathstuf (subscriber, #69389)
[Link]
uzbl.follow = (function () { /* private implementation */ return { /* api object */ }; })();
Posted Feb 5, 2013 18:50 UTC (Tue)
by pboddie (guest, #50784)
[Link] (5 responses)
The problem with KDE and GNOME, as far as I have seen, has been the unwillingness to embrace high-level languages as first-class citizens. So although there have been some pretty good bindings for Python in both environments, there has been a tendency to push development in such languages to the margins, and the emphasis on supporting and documenting usage of such languages has been even less than for the languages favoured by the core developers.
Although I can understand that people don't want the core of a system to be a chaotic multi-language mess, the result of these policies seems to have been a reduced level of interest in developing the core components and even the accompanying applications. After all, doing stuff in C or C++ doesn't appeal to everyone. But the mindset that labels people who won't write C or C++ as "scripters", believing that they will be happy writing JavaScript on some impoverished API, is merely a continuation of the mindset that refuses to accept that people write entire systems in high-level languages and will gladly write applications for their platform if properly supported.
Instead, one gets the impression that the message is, "We hear JavaScript is cool these days, so how about you use that?" I think that people who have been pretty good at rejecting change over the years should perhaps spend a bit more time understanding their community before encouraging others to switch bandwagon, especially when those others weren't basing their choice of technology on how cool it may or may not be, anyway.
Posted Feb 5, 2013 20:15 UTC (Tue)
by ovitters (guest, #27950)
[Link] (2 responses)
Posted Feb 6, 2013 11:02 UTC (Wed)
by pboddie (guest, #50784)
[Link] (1 responses)
I used to be more interested in writing desktop applications, and I would have wanted to do this in Python. Admittedly, you could do this with PyQt/PyKDE and the corresponding Gtk/GNOME offering, but despite the best efforts of the project maintainers concerned (specifically referring to PyQt/PyKDE here), things never seemed to settle enough to support those projects fully in the underlying system. There were some attempts to make "official" bindings for KDE 3, and Kubuntu did introduce some Python-based components, but I perceive those things to be too little, too late.
Offering me JavaScript is like offering me a motorcycle. I could certainly learn how to ride one properly, but as others have pointed out, by the time I have done that my interests may be better served elsewhere.
Posted Feb 6, 2013 11:28 UTC (Wed)
by drago01 (subscriber, #50715)
[Link]
Posted Feb 5, 2013 20:23 UTC (Tue)
by kragil (guest, #34373)
[Link] (1 responses)
And any ways with the additions in ECMAScript6 JS will eventually be a decent language and it is small and fast and flexible.
At the moment it has a lot of warts, but you can use CoffeeScript or TypeScript to get around those now.
Javascript momentum will only increase in the future IMO, so betting on it now isn't that stupid.
Posted Feb 5, 2013 22:44 UTC (Tue)
by atai (subscriber, #10977)
[Link]
Do you know if ECMAScript6 JS will be small and fast?
Posted Feb 5, 2013 18:50 UTC (Tue)
by Kit (guest, #55925)
[Link] (11 responses)
I thought that was Vala? Whatever happened to Vala, anyways?
Posted Feb 5, 2013 20:54 UTC (Tue)
by drag (guest, #31333)
[Link]
Posted Feb 5, 2013 21:05 UTC (Tue)
by marduk (subscriber, #3831)
[Link] (9 responses)
Vala is still there. I can't speak for those guys but if I were to guess I'd say they didn't pick Vala for 2 reasons:
1) It's not "done" yet. There are still some TODOs on Vala. Although it's obviously mature enough that people are using it for complex stuff, I guess they wanted something a bit more "mature"
2) It's not well-known/popular/standard/what-have-you. Like it or not, many people already know JavaScript (at least they think they do :). Vala is a lot like C# (and Java), but it isn't. Whereas GJS is (apparently) "pure" JavaScript.
3) Perhaps because of all the C#/Mono in GNOME outcry, they wanted to avoid that flame war in favor of fresher flames.
One only wishes we could see/hear/read the full discussions that went preceded the decision.
Posted Feb 8, 2013 5:52 UTC (Fri)
by dashesy (guest, #74652)
[Link] (8 responses)
Posted Feb 8, 2013 9:00 UTC (Fri)
by khim (subscriber, #9252)
[Link] (6 responses)
C# is nice language but it's dead-end because it's developed by Microsoft. It's not that Microsoft can only ever develop bad things, far from it, but the fact that Microsoft is all-too-ready to sue everyone over it's creations (see FAT patents) means that they must be avoided as much as possible. Which is sad (C# is a better language then JavaScript), but that's the world we live in.
Posted Feb 8, 2013 15:20 UTC (Fri)
by raven667 (subscriber, #5198)
[Link] (5 responses)
Posted Feb 8, 2013 15:48 UTC (Fri)
by marduk (subscriber, #3831)
[Link]
Oh, you mean like how Oracle supports projects like Linux, BTRFS, Java, MySQL et al. (see Oracle v. Google)?
Mono is a nich market. I have few doubts that if Mono ever got too big (à la Android) then Microsoft would arm their torpedos.
All kidding aside, one of the points of my original comment was to inform that their was already an outcry about C#/Mono (and Java as well now that we mention it), so C# was perhaps in some minds passed over as "been there. done that."
So while JS was certainly going to start a forest fire (as any language would to some degree), C# (and Java) would have as well, as well as flames of a different forest.
Posted Feb 8, 2013 16:07 UTC (Fri)
by khim (subscriber, #9252)
[Link] (3 responses)
Explicit patent grants only cover small piece of C# (basically only the part which were proposed to become an ISO standard). Large parts of contemporary C# are not covered by these grants. This means that either you'll be forced to use obsolete version of C# (which will irritate many users) or you'll need to try to sidestep patents and implement the functionality in non-infringing way (as was done with FAT). Add the fact that this stuff is produced by a company with known history of such bait-and-switch tactic (FAT patents, again) and the only conclusion is: never. As I've said: C# is nicer language then many other contenders but for legal reason it's non-starter.
Posted Feb 8, 2013 17:26 UTC (Fri)
by dashesy (guest, #74652)
[Link] (2 responses)
Posted Feb 8, 2013 18:12 UTC (Fri)
by raven667 (subscriber, #5198)
[Link] (1 responses)
I think underlying most of the anti-C# sentiment is a an anti-MS sentiment and is more political than technical or legal. It doesn't matter if code is open sourced or if there are patent grants or whatever, if it has been touched by MS it has software cooties. 8-)
Posted Feb 8, 2013 21:56 UTC (Fri)
by khim (subscriber, #9252)
[Link]
Anything and everything is covered by patents novadays, but this is somewhat different case. Not "cooties". Legal threats. You need huge amount of money and effort to protect themselves from someone who wants to sue you (see Google's Android and Oracle - and Java was covered by a lot of "promises", too) and Microsoft is a company with a known track record of pushing something as a "standard" then suing people over said "standard" later. P.S. People often use "it's just a business, nothing personal" justification, and this is good justification. Good enough to avoid such "business" as much a possible, that is. Because this means that you can not ever accept anything from such a "business" without lawyers help - and this help is expensive.
Posted Feb 9, 2013 2:49 UTC (Sat)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Feb 5, 2013 23:07 UTC (Tue)
by robert_s (subscriber, #42402)
[Link] (2 responses)
And yes, Crockford is very convincing, but the fact remains that I have never seen a sanely written javascript project of any significant size.
Posted Feb 6, 2013 0:05 UTC (Wed)
by FranTaylor (guest, #80190)
[Link] (1 responses)
Of course you would not be able to see all the internal apps that are being written in node.js. It's like the desktop developers who think that java doesn't exist because they don't see any java apps, when in fact java is all over the server, calculating your bills and your paychecks.
Posted Feb 16, 2013 12:58 UTC (Sat)
by robert_s (subscriber, #42402)
[Link]
Posted Feb 5, 2013 17:27 UTC (Tue)
by raven667 (subscriber, #5198)
[Link] (3 responses)
Posted Feb 5, 2013 17:38 UTC (Tue)
by FranTaylor (guest, #80190)
[Link] (2 responses)
Posted Feb 5, 2013 17:57 UTC (Tue)
by aseigo (guest, #18394)
[Link] (1 responses)
QML's declarative model is also rather different (and more sane) than HTML+CSS. It's what the web-for-apps should be imo: designed for the developer and for performance without sacrifice.
So I wouldn't personally use QML as supporting evidence for HTML. :) For the power of the declarative model and to see how Javascript can be used as part of complex application development without making you want to pluck your eyes out (or retreating into the arms of a toolkit-on-top-of-the-language-that-is-running-in-a-toolkit..), yes ...
Posted Feb 6, 2013 0:11 UTC (Wed)
by FranTaylor (guest, #80190)
[Link]
Posted Feb 5, 2013 18:05 UTC (Tue)
by tjc (guest, #137)
[Link] (10 responses)
Rubbish! JavaScript suffers from a few questionable design decisions, but it's surprisingly good considering the speed at which it was created. It's delightfully eclectic, with its non-constructor based objects. And it has anonymous functions and closures, so it's a little bit lispy too.
I think a lot of people who pan JavaScript are really criticizing the HTML DOM (or the web browser application development environment (which is a lot better than it used to be)) without realizing it.
Posted Feb 5, 2013 23:12 UTC (Tue)
by robert_s (subscriber, #42402)
[Link] (3 responses)
I think you're rather glibly dismissing javascript's critics, most of whom (I've met) tend to be rather experienced programmers.
Posted Feb 5, 2013 23:54 UTC (Tue)
by FranTaylor (guest, #80190)
[Link] (1 responses)
Cobol programmers are experienced programmers. Nintendo DS programmers are experienced programmers. They can have vast experience and yet they can also be very poor judges of languages that they haven't been paid to write in.
Posted Feb 6, 2013 11:07 UTC (Wed)
by pboddie (guest, #50784)
[Link]
Posted Feb 6, 2013 1:04 UTC (Wed)
by tjc (guest, #137)
[Link]
Posted Feb 6, 2013 13:04 UTC (Wed)
by KSteffensen (guest, #68295)
[Link] (1 responses)
Posted Feb 7, 2013 23:39 UTC (Thu)
by tjc (guest, #137)
[Link]
Posted Feb 6, 2013 16:33 UTC (Wed)
by ThinkRob (guest, #64513)
[Link] (1 responses)
And there's the problem. Not the lisp-y part. I dig that. But the "surprisingly good considering the speed with which it was created" and the "delightfully eclectic" bits. Those aren't good things. Or at least they aren't in this context.
Yes, if Javascript were something that were a quick prototype it would be impressive. It's not. It may have started as a fast way to get some client-side scriptability for use in the Web, but once it steps outside of that arena and starts competing against languages that benefited from a longer development time its rushed nature becomes evident.
And "delightfully eclectic"? I like obscure and quirky tech as much as the next geek -- it's the sort of thing that I'll happily spend a weekend learning because it's fun -- but when it comes to actually getting things done I don't want a language which can be praised by saying it's "delightfully eclectic". I want "unsurprisingly uniform" or "mundanely conventional."
> I think a lot of people who pan JavaScript are really criticizing the HTML DOM (or the web browser application development environment (which is a lot better than it used to be)) without realizing it.
Well, yes, those parts suck too. But the former can be abstracted into the realm of "doesn't suck", and the latter -- while still nowhere near having a proper development environment -- is as you say a lot better than it used to be.
Posted Feb 7, 2013 23:51 UTC (Thu)
by tjc (guest, #137)
[Link]
I guess I should at least correct the bad example I gave, i.e. "non-constructor based objects." Scratch the "non-" part; I should have said something like "constructor-based objects," or maybe "prototype-based objects" -- I'm not really sure what the correct term is.
Posted Feb 6, 2013 18:15 UTC (Wed)
by oldtomas (guest, #72579)
[Link] (1 responses)
That *was* my very point. If half of the Crockford legend is true, I tip my hat in admiration. It should have had more time to mature, thugh.
> It's delightfully eclectic, with its non-constructor based objects
That's specifically one part I *do* like about Javascript. But then there's Lua...
> And it has anonymous functions and closures, so it's a little bit lispy too
And that's another part I do like about Javascript. The core is good, but it got frozen without a chance of shedding all the mess of design mistakes it should have thrown away. No, I'm not clamoring for types. I don't particularly appreciate static types "the Java way". Maybe "the Haskell way" -- not enough experience with that.
Posted Feb 6, 2013 23:49 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
Haskell can typically figure out what you want for types (type declarations on functions are typically "make sure I didn't screw up" or "don't generalize too much"[1]). Think of it of C++11's 'auto', but with the ability to use it pretty much everywhere if you want (argument types, template types, return values, etc.). And you wouldn't have to type 'auto'.
[1]I'm pretty sure that (length :: [a] -> Int) is usually optimized better than a (genericLength :: (Num b) => [a] -> b).
Posted Feb 5, 2013 18:20 UTC (Tue)
by epa (subscriber, #39769)
[Link] (16 responses)
Posted Feb 5, 2013 20:56 UTC (Tue)
by drag (guest, #31333)
[Link] (12 responses)
Why bother ask such a question?
Posted Feb 6, 2013 9:19 UTC (Wed)
by epa (subscriber, #39769)
[Link] (9 responses)
Posted Feb 6, 2013 14:46 UTC (Wed)
by ovitters (guest, #27950)
[Link] (8 responses)
Posted Feb 6, 2013 15:17 UTC (Wed)
by epa (subscriber, #39769)
[Link] (1 responses)
While there are programs written against GTK+ 1.x which needed porting work to 2.x, and some (such as my former preferred web browser, Dillo) which were 'lost' to the GTK+ world in this way, that's not really a fair point to make in a comparison against Qt because Qt 1.x is equally obsolete.
So I take back what I wrote; I really meant to defend Qt as having a good backwards-compatibility track record, rather than denigrate GTK+ and GNOME.
Posted Feb 6, 2013 15:33 UTC (Wed)
by pboddie (guest, #50784)
[Link]
Certainly, lots of people still seem to develop against Qt (despite Nokia trying to eliminate the business of supporting and developing it sustainably), and backwards-compatibility has a lot to do with that, alongside a long track-record of support for the technology actually being available.
Posted Feb 6, 2013 19:33 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Feb 7, 2013 9:17 UTC (Thu)
by ovitters (guest, #27950)
[Link]
Posted Feb 7, 2013 6:29 UTC (Thu)
by paulj (subscriber, #341)
[Link] (3 responses)
I mentioned it before here: https://lwn.net/Articles/526428/
Posted Feb 7, 2013 9:16 UTC (Thu)
by ovitters (guest, #27950)
[Link] (2 responses)
We then changed the major version many years later.
Only *now* you're having difficulties only because your distribution does not ship the library anymore. In your other comment you suggest that somehow there are conflicts between the 2.x libraries and the 3.x. That is not the case, please show where it is.
From what I can gather, you're only running into difficulties building libraries. That your distribution does not ship this library anymore (mainly because all maintained programs did move over to gvfs) does not imply backwards compatibility was broken.
Posted Feb 7, 2013 9:32 UTC (Thu)
by paulj (subscriber, #341)
[Link] (1 responses)
I mention this not to dispute your point that GNOME maintains binary compatibility in libraries, but to provide a data-point that suggests that this is not sufficient for functional compatibility from the users' point of view. GNOME developers could look into that and see if anything could be done, if they felt it important.
Posted Feb 7, 2013 15:58 UTC (Thu)
by raven667 (subscriber, #5198)
[Link]
That's not the world we live in though, user space, long term compatibility isn't the biggest priority.
Posted Feb 6, 2013 9:36 UTC (Wed)
by BlueLightning (subscriber, #38978)
[Link] (1 responses)
Posted Feb 6, 2013 16:47 UTC (Wed)
by drag (guest, #31333)
[Link]
Posted Feb 6, 2013 1:08 UTC (Wed)
by tjc (guest, #137)
[Link] (2 responses)
Posted Feb 6, 2013 3:16 UTC (Wed)
by Sho (subscriber, #8956)
[Link]
Posted Feb 6, 2013 13:35 UTC (Wed)
by macson_g (guest, #12717)
[Link]
Posted Feb 5, 2013 18:52 UTC (Tue)
by keithcu (guest, #58738)
[Link] (1 responses)
Here are the first few paragraphs:
Yesterday I read a blog post / announcement about how Gnome is moving to Javascript and I wanted to write some feedback.
It is great that they are using a garbage-collected language for as much code as possible. For a component-based shell UI, Javascript is a reasonable choice, and surely better than C, C++, or Java. I realize they started down this road towards Javascript years ago, but I think it is worth re-considering whether they are on the right path.
With big decisions, it is nice to have a paper trail. I can find no supporting documentation backing up the decision and the reasons other than one blog post written after the fact, which doesn’t give very much information.
It appears the decision was made in a meeting. It is great to have meetings to discuss things, and it is great to make decisions in meetings, but oftentimes the results are about moving the decision-making process forward, not actually committing to big things. Even if there were many in that room, there are surely facts they didn’t have, and other interested parties who were not there. There is the risk of “tyranny” by a self-selected cabal. Hopefully the decision wasn’t made at a bar ;-)
Posted Feb 5, 2013 20:22 UTC (Tue)
by ovitters (guest, #27950)
[Link]
So it was not made in a meeting, everyone who wanted to join could've, the hackfest was pretty widely announced, you could get sponsored to go to the hackfest, people with intimate knowledge about various languages attended (incl Python for instance).
Seems you like Python. Cool. You might want to read Planet GNOME. For instance this blog post by one of the people who worked on the Python bindings: http://www.j5live.com/2013/02/04/gnome-and-languages/
Posted Feb 5, 2013 21:19 UTC (Tue)
by atai (subscriber, #10977)
[Link] (1 responses)
The most extreme scenario is like Android, where it is impossible to write an app without involving Java (if using native system UI facilities). I hope this will not be the scenario with GNOME and Jaavscript
Posted Feb 5, 2013 21:43 UTC (Tue)
by drag (guest, #31333)
[Link]
They really want to make one a first class 'this is what you use' language for Gnome so they can concentrate on improving the stuff that matters... development tools, test cases, documentation, etc etc.
Javascript is just about the most commonly used and understood programming language on Earth right now. GJS is based on SeaMonkey so that it's fast, well supported, mature, and modern garbage collected language, and other happy stuff. Apparently the bindings are good even though it's relatively new for Gnome. Makes sense to pick it despite the natural snobbery you see from language lawyers you'd expect to see. :P
Posted Feb 5, 2013 23:06 UTC (Tue)
by zlynx (guest, #2285)
[Link] (26 responses)
The problem is, dynamic languages make lazy programmers. They don't know or care what values a function might return. They only care about what it returns on success.
You might think that a Python library would return with an exception if it hit an error. How wrong. No, Python libraries return whatever the programmer felt like that day. If it returns a string in normal operation it might return an empty string on failure. Or False. Or None. Or a tuple of error code and description string. Or a custom Error object of some sort. Sometimes an exception. Pretty much at random, and the interpreter won't help you with a warning of any sort until an error actually happens.
This leads to the really annoying Python programs I keep running into on the Linux desktop where they work fine most of the time, but if you try to open a file on a network share and it returns some unexpected error the entire program exits with a stack trace.
Or the lovely errors and crashes the Fedora installer likes to return because it got an unexpected return value from probing LVM or RAID settings.
The VERY BEST THING for these programmers is to lock them into a C, C++ or Java straight-jacket and throw away the key. Hide the dynamic languages somewhere they can't find them. They might be allowed to use Go or Scala if they ask nicely.
Javascript is a horrible idea.
Posted Feb 5, 2013 23:59 UTC (Tue)
by FranTaylor (guest, #80190)
[Link] (7 responses)
They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.
Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts. You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.
Posted Feb 6, 2013 0:50 UTC (Wed)
by HelloWorld (guest, #56129)
[Link]
> Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.
> You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.
Posted Feb 6, 2013 3:21 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
I understand "redundant" but irrelevant? Care to give an example?
> Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.
IME, at least I can get a static-typed language's compiler to warn me about cases. Python, PHP, JS, etc. just chug along merrily without a peep.
> You can say "experienced developers should not fall for this" but the simple fact is that even the most experienced developers create far more bugs per LOC in static languages than they do in dynamic ones.
I believe the research that I heard about[1] last found that bugs per LOC is about the same in every language[2]. It's just that "scripting" languages (which tend to be dynamic-typed) typically need fewer lines to do what they need.
[1]I'll try to find it.
Posted Feb 6, 2013 18:11 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
It seems that this[1] StackOverflow post is a place to launch from.
[1]http://stackoverflow.com/questions/2898571/basis-for-clai...
Posted Feb 6, 2013 21:17 UTC (Wed)
by khim (subscriber, #9252)
[Link] (3 responses)
Care to offer an example of a sizable program which is 10+ years old, not maintained by the people who've written it 10 years ago and which is written in a dynamic language? There are many such programs in C and enough in Java, but I'm yet to see anything like this in a dynamic language. When people who designed stuff are moving from project programs in dynamic languages quickly turn to unmaintainable mess and are usually rewritten. This is direct opposite to "easier to maintain" in my book. Programs in statically typed languages are kept around for decades (Cobol jokes aside there are a lot of programs in statically typed languages which are still in use). Have you ever worked with security teams? Do you know where bugs unnoticed by QA but actively exploited in the wild come from? Many many bugs come from dynamically typed languages (primarily JavaScript and PHP, of course) which "do the right thing" in hothouse QA testing but then break apart in the wild. If you want to create program which will frustrate QA but which which will work reliable once released - use statically typed languages, if you want to create program which easily passes QA but then guarantees lifelong job insurance because someone needs to plug security holes again and again - use dynamic languages.
Posted Feb 7, 2013 1:17 UTC (Thu)
by dirtyepic (guest, #30178)
[Link] (1 responses)
Portage.
Posted Feb 7, 2013 6:10 UTC (Thu)
by khim (subscriber, #9252)
[Link]
Portage is great example of the phenomenon described above: it had few serious instances of typical dynamic languages crises of "we don't understand what goes on here and don't know how to fix that" variety, large pieces of it were rewritten in not-really-backward-compatible-manner because noone knew what goes in some pieces of it... and it's still a PITA for a Gentoo developers because of all these problems.
Posted Feb 7, 2013 5:05 UTC (Thu)
by bronson (subscriber, #4806)
[Link]
Posted Feb 6, 2013 9:23 UTC (Wed)
by epa (subscriber, #39769)
[Link] (16 responses)
Posted Feb 6, 2013 17:22 UTC (Wed)
by HelloWorld (guest, #56129)
[Link] (15 responses)
(and no, you shouldn't take this to mean that I somehow endorse Java. I don't, it plain sucks as a language.)
Posted Feb 6, 2013 21:45 UTC (Wed)
by zlynx (guest, #2285)
[Link] (7 responses)
Posted Feb 6, 2013 21:58 UTC (Wed)
by mpr22 (subscriber, #60784)
[Link]
Posted Feb 8, 2013 14:51 UTC (Fri)
by jwakely (subscriber, #60262)
[Link] (5 responses)
What's GCC's option for that?
You can use __attribute__((warn_unused_result)) but putting that on every function returning non-void is hardly practical, let alone portable.
Posted Feb 12, 2013 19:51 UTC (Tue)
by mgedmin (subscriber, #34497)
[Link] (3 responses)
Posted Feb 12, 2013 20:21 UTC (Tue)
by nybble41 (subscriber, #55106)
[Link] (2 responses)
Posted Feb 12, 2013 21:03 UTC (Tue)
by mpr22 (subscriber, #60784)
[Link] (1 responses)
Posted Feb 12, 2013 22:56 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Nope. Apart from maybe printf() - most of the error checking is necessary for secure code.
It just shows that exception handling is really much better than return codes when you want something that's reliable _and_ easy to read.
Posted Feb 12, 2013 21:04 UTC (Tue)
by zlynx (guest, #2285)
[Link]
Warnings about unused results are also common in code analysers like Splint and others.
Posted Feb 7, 2013 1:44 UTC (Thu)
by ThinkRob (guest, #64513)
[Link] (5 responses)
Oh no, there are ways.
Like someone deciding to make a base exception class that extends RuntimeException thus does not need explicit 'try'/'catch' handling or 'throws' declarations.
Sadly, this is not purely hypothetical. I've worked on codebases where this was the case; damn near everything was a runtime exception. It was very explodey.
Posted Feb 7, 2013 6:15 UTC (Thu)
by khim (subscriber, #9252)
[Link] (4 responses)
Posted Feb 7, 2013 8:23 UTC (Thu)
by ekj (guest, #1524)
[Link] (3 responses)
Nobody really thinks it's a good idea, for example that "0.0" == 0 is true but if(0) and if("0.0") has opposite effects. (i.e. despite the fact that "0.0" is claimed to be equal to 0, nevertheless one of these is considered "true" in a boolean context, while the other is false.
if ( $a == $b && $a && !$b) is potentially true in PHP, and that's just *one* example of the mistakes made while designing this language.
Posted Feb 7, 2013 11:58 UTC (Thu)
by khim (subscriber, #9252)
[Link] (2 responses)
Well, it look like we are in violent agreement, then. JavaScript's analogue: > a = "0" JavaScript is fucked up for the very same reason PHP is fucked up: they try to "silently fix novice's errors" - and in real programs this tends to lead to security holes sooner or later (usually sooner). Neither PHP not JavaScript should be used directly "as is". Never. Solution for PHP: don't. Just forget about PHP and use some other languages if posible. There are many of them: Java, Python, even C or Perl are better then PHP. Just don't. Solution for JavaScript: use some higher-level language which is compiled to JavaScript. There are quite a few contenders at this time: CoffeeScript, TypeScript, even subset of Java (if you use GWT). To add JavaScript to your desktop environment as a primary development tool? Gosh, what are they thinking? Do they hate developers this much?
Posted Feb 7, 2013 13:38 UTC (Thu)
by ekj (guest, #1524)
[Link] (1 responses)
Python is, IMHO proof that it's possible to solve many of these problems and have a cleaner, safer language while remaining dynamically typed.
In Python 0 == "0" is False (indeed 0 == any_string_whatsoever is False)
Posted Feb 7, 2013 16:25 UTC (Thu)
by khim (subscriber, #9252)
[Link]
These programs can not be ever be solved (you can write Fortran in any language) but they can be reduced. Statically typed languages are on one side of the spectrum (and there there are different shades of gray, too): a lot of problems are detected when you try to compile program. Dynamically typed languages are the next best thing: problems are detected in runtime and end user observes see "[x is out of range]" instead of "there are no page to edit" message, but the PHP is at the other end of spectrum: user does not see anything wrong while it's data is slowly corrupted beyond repair. JavaScript is close behind. Sure. But it still does not make it usable for an industrial projects. Which are defined not by size but by staff turnover: it's not uncommon to see project handled by 4 or 5 generations of programmers in the course of 10 years in a commercial environment - and each generation start with the code but without help from the previous generation. Dynamically typed languages almost wholly unsuitable for such a development, statically typed languages fare much better.
Posted Feb 7, 2013 12:11 UTC (Thu)
by epa (subscriber, #39769)
[Link]
Posted Feb 6, 2013 11:11 UTC (Wed)
by pboddie (guest, #50784)
[Link]
Posted Feb 6, 2013 1:18 UTC (Wed)
by russell (guest, #10458)
[Link] (4 responses)
Posted Feb 6, 2013 4:00 UTC (Wed)
by jgon (guest, #89199)
[Link] (1 responses)
1) Hate doing math with anything other than floats, that can overflow or truncate silently. Even though everything is an object, why would we want a numeric tower in the first place?
2) Hate modularity. Luckily in one of his responses the Gnome dev said that they are targeting apps the same size as you might find on your smartphone.
3) Related to 2, apparently enjoy the idea of using apps that are small due to screen and power constraints as your model for desktop apps. Angry Birds Gnome here we come, LibreOffice get lost. Why should any app be greater than 10,000 LOC? Luckily with javascript you'll have a hard time getting there anyway.
4) Hate using a language that allows a program to pay for only what it needs. Tree-shaking is impossible so even if you aren't using it, you'll bring it along anyway. Luckily you can minimize and gzip your libraries just like in web development! Also, this way you can spend your development time deciding if the convenience function you want to add provides more utility than it costs in library size and start-up time. What else are you going to spend your time doing?
5) Hate apps that start-up quickly. Luckily in Javascript you have to parse and run the code that creates your structures and functions, because Javascript mutates your environment state as you parse it! Declarative definitions be-gone! This is also super helpful if you hate the ability to provide tooling for your environment, because you only know what code does once you run it with the full state of the program and run-time behind it!
6) Hate sensible lexical scope. No big deal, it's only been 50+ years since Algol introduced it, why would we need it in 2013? For loops should always be confusing to deal with.
7) Hate languages that are responsive to user complaints. Javascript has managed to go ~13 years since it had any substantive changes made to it, and the committee is working as hard as it can to ignore user input for at least another year or two. Luckily, even if they are forced to put out a new standard, it will still be years before you can expect widespread adoption. If I play my cards right I can probably go another decade before being able to count on ints and lexical scoping.
In summary, this seems to be another attempt by Gnome to chase after the mythical "mainstream" although this time it's mainstream developers they're chasing and not users. I can't see any sort of technical grounds on which this decision could have been made, so it must be another popularity contest that the Gnome devs have decided to wade into. I wish them luck, and I can't wait for the hundreds of todo apps, and pomodoro timers this decision will surely lead to.
Posted Feb 6, 2013 19:08 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
To be fair, Python also has function scoping. Though it is saved in that variables are local by default.
Posted Feb 6, 2013 21:23 UTC (Wed)
by khim (subscriber, #9252)
[Link] (1 responses)
It depends on the availability of ways to deploy code written in other languages. Today you can only use JavaScript if you want to create application which works in browser and does not require installation. Java is basically dead (because Sun/Oracle were unable to make it adequately safe), Flash is dying (Apple succeeded in killing it) so what's left? JavaScript. There are some interesting projects in development, but I'm not sure we'll have a choice of anything besides JavaScript any time soon. But to use JavaScript outside of web development? That's insanity, pure and simple.
Posted Feb 8, 2013 6:07 UTC (Fri)
by dashesy (guest, #74652)
[Link]
Posted Feb 6, 2013 7:50 UTC (Wed)
by lkundrak (subscriber, #43452)
[Link] (11 responses)
Posted Feb 6, 2013 10:12 UTC (Wed)
by dgm (subscriber, #49227)
[Link]
Posted Feb 6, 2013 11:39 UTC (Wed)
by drago01 (subscriber, #50715)
[Link] (9 responses)
Posted Feb 6, 2013 18:19 UTC (Wed)
by droundy (subscriber, #4559)
[Link] (8 responses)
Posted Feb 7, 2013 9:22 UTC (Thu)
by ovitters (guest, #27950)
[Link] (5 responses)
Posted Feb 7, 2013 15:03 UTC (Thu)
by paulj (subscriber, #341)
[Link] (4 responses)
Posted Feb 7, 2013 15:14 UTC (Thu)
by ovitters (guest, #27950)
[Link] (3 responses)
You bring up something different, higher resource usage compared to metacity/compiz. GNOME shell is based on clutter, etc. Totally different than metacity.
The higher usage vs metacity is partly because of compositing and at the moment there is a binding bug with clutter (IIRC). Not much to do with Javascript. It would have been exposed in any binding. That bug was unfortunately only fixed in unstable, not in 3.6.x. In any case, you would've seen the same in Python, etc.
Of course, you can judge a Javascript decision on whether or not that bug is fixed at the moment. But actually we also fix memory leaks in other programs. Be it C (lots), Python, etc.
Posted Feb 7, 2013 15:43 UTC (Thu)
by paulj (subscriber, #341)
[Link]
If bugs relating to leaks have been fixed, and things are due to improve in future releases, that's great.
I didn't place any blame on Javascript. ;) Though, for whatever it's worth, my experience is that it can be even harder to avoid or fix leaks in GCed languages than in ones with explicit semantics for managing ownership of memory.
Posted Feb 11, 2013 15:25 UTC (Mon)
by droundy (subscriber, #4559)
[Link] (1 responses)
Posted Feb 11, 2013 15:42 UTC (Mon)
by ovitters (guest, #27950)
[Link]
In practice the slowness is often combination of compositing and drivers btw (aside from just outright gnome-shell bugs :P). Use gnome-shell on another system or with another driver and you'll see a huge difference.
Posted Feb 7, 2013 10:05 UTC (Thu)
by ncm (guest, #165)
[Link]
Staying relevant is the exception. Linux still is. C++ and even C still are. Intel, astonishingly, still is. TCP/IP is. Things don't look too good for Java or for habeas corpus. One of those will be missed even by people who say we never really had it.
Posted Feb 7, 2013 12:22 UTC (Thu)
by kigurai (guest, #85475)
[Link]
gnome-documents is pretty fast. Try it.
Posted Feb 6, 2013 10:32 UTC (Wed)
by canatella (subscriber, #6745)
[Link] (2 responses)
http://www.ecma-international.org/publications/standards/...
You'll see it's a well constructed and thought of language. It has its quirks, but any language has some. Then there is the statically vs dynamically typed language battle which is not only related to javascript. I do like both, you just have to use the right tool for the job. I find that higher level stuff is best written and maintained in dynamic stuff while libs and frameworks needs the constraint of statically typed languages (fyi, I've been also programming in perl, ruby and java).
People complaining about javascript should first learn about it, write a real applications and then express themselves. I'm convinced a _good_ C programmer can also write good and maintainable application in javascript.
Posted Feb 6, 2013 21:31 UTC (Wed)
by khim (subscriber, #9252)
[Link]
It's not "high-level" is "low-level". It's "few knowledgeable maintainers who really know what they are doing" vs "bunch of random fixes from all around the place brought together by people who've not participated in the initial design". High-level stuff just more often falls in the first category and libraries more often fall into the second category. Dynamically-typed languages are nice and fast to program in if you know what you are doing, statically-typed languages provide guarantee that at least the most awful atrocities will be caught right away.
Posted Feb 7, 2013 0:01 UTC (Thu)
by man_ls (guest, #15091)
[Link]
But frankly, it lacks a few things. There are no provisions for modularization; nothing to make big modules out of small pieces. There is not even a mechanism to include one file in another, something so basic that even pseudo-languages like XSL manage to do (and that all implementations have to invent on their own). The object-oriented model is pathetic; prototypes just don't cut it. Inheritance is a joke. Callbacks can get hellish quickly; I have heard people rooting for promises, but I am not sure they will solve anything. And so on.
The good side: you can build all of these pieces yourself since the building blocks are so basic. And they can be added to the spec later on (perhaps even decent inheritance?). We can only hope.
Posted Feb 6, 2013 12:59 UTC (Wed)
by man_ls (guest, #15091)
[Link] (3 responses)
Posted Feb 6, 2013 15:01 UTC (Wed)
by nye (subscriber, #51576)
[Link] (2 responses)
I've only really come across complaint from people talking about the DOM, not the language itself.
Are there deeper implementation incompatibilities that I'm not aware of?
Posted Feb 6, 2013 16:28 UTC (Wed)
by man_ls (guest, #15091)
[Link] (1 responses)
Posted Feb 6, 2013 18:15 UTC (Wed)
by nye (subscriber, #51576)
[Link]
IE6 is always the anomaly in this kind of thing, in that it had so many bugs even at the time, but I think if anyone is currently considering developing for Gnome but only willing to write in the specific JS dialect available in IE6 then they probably have bigger problems.
Obviously if the implementation they're using only supports older language versions that people are used to using then there is a problem, but if anything it's likely to be the other way around.
A bigger potential for problems would be if there are certain language constructs that work in different JS versions but do *different things*; I have no idea if that could be the case.
Posted Feb 6, 2013 19:37 UTC (Wed)
by klapauzius (guest, #89215)
[Link] (1 responses)
Answer from a GNOME developer:
Excuse me, but may i ask very politely: What exactly is a "de-bugga" ?
Although i have no idea what you're talking about i looked up this webpage and it says there's a program called "looking glass" that seems to be that de-beggar thing you're missing. From what i understood it basically does nothing and crashes most of the time, which brings me to my second point: What in the world should such a de-bigger thing be for ? Anyway, i didn't need a "dee-bagga" for my latest business app that shows the words "Hello World" in a reeeeeeeally awesome animation if you touch a 4-pixel wide area of the screen edge with the mouse and press a certain key-combo simultaneously. So i have to assume that a de-bogger is simply one of those remnants of the past, of days of programming "programs" gone by that we at GNOME simply did away with a long time ago. We don't do that. We develop apps. No dee-bagger here. Move on. Live with it. If that's not for you, well, get lost. Which makes me believe that your absurd question about this "dao-bugga" is just another attempt at trolling, at pouring the nasty liquid of the GNOME-haters on our beloved desktop environment that does very well without duh-biggers, thank you very much ! I therefore recommend you move on to some other, de-baggo-containing DE like KDE, CDE or whatever and de-bag as long as you may wish !
Get lost !
Posted Feb 11, 2013 23:41 UTC (Mon)
by nix (subscriber, #2304)
[Link]
(sorry sorry the devil made me say it, and if you don't get it google either Trurl or Klapaucius...)
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Also, as a side bonus, the GNOME and KDE projects could eventually be completely eliminated, finally solving the community divisions and incompetence issues they have.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
JavaScript's core is fine, but it was frozen too early.
[8, 9, 10]
> test.sort()
[10, 8, 9]
[8, 9, 10]
["8", "9", "10", "b", "a"]
> test.sort(function(a,b){return a-b})
["8", "9", "10", "b", "a"]
10
> b = "11"
"11"
> c = "9"
"9"
> a < b
true
> b < c
true
> c < a
true
"a"
> b = 10
10
> a <= b
false
> b <= a
false
"Hello"
j = 0; for (i in test) j+=i; j
"001234"
10
There is only one possible response to the tidal wave of lunacy in that post of yours: WAT.
Reitter: Answering the question: "How do I develop an app for GNOME?"
For a slightly expanded WAT in video format, also covering some absurdities in other programming languages besides JavaScript, see Gary Bernhardt's talk.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
<p>
But data structures and algorithms that depend on sorting break if there exist a,b,c such that a<b, b<c, and c<a are all true, so warts like this are a significant source of bugs.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Your examples mostly just made no sense - they worked in an unexpected way because there was really no sane expected behaviour (why should "a" be in any way comparable to 10, for example? What does it mean to add up the contents of a string?).
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
That doesn't make it less bogus.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Since systems behave differently, you don't know what will happen, so it's undefined.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
function foo(){
return array('a', 'b');
}
function foo(){
return ['a', 'b'];
}
alert(foo()[0]); // Of course this works!
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
You can actually emulate let in JavaScript.
Reitter: Answering the question: "How do I develop an app for GNOME?"
(let ((foo bar)) baz)
would translate to
(function(foo) { return baz; })(bar)
Well, that's probably the kind of construct you'd call "interesting".
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
> 2 + (let (x = 3) x+x) + 5
13
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Can you point out to the flame war related to C#/Mono?
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
I'm not sure it's more or less patented than any other language, common techniques for language, compiler, JIT, VM and interpreter design are likely to be patented by someone such as MS regardless of which language you are actually using.
I think underlying most of the anti-C# sentiment is a an anti-MS sentiment and is more political than technical or legal. It doesn't matter if code is open sourced or if there are patent grants or whatever, if it has been touched by MS it has software cooties. 8-)
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
I was thinking more of unexperienced programmers who copy and paste JavaScript snippets from the Internet and them deride JavaScript as a bad language when they can't get them to work correctly with their code.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Qt introduced native JavaScript support in Qt-4.3, which was released in May 2007.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Modern languages have type inference.
The issue here isn't static typing but what you call "implied casts". And in fact, sensible languages don't have those except in cases where they're guaranteed to work (i. e. subtype to supertype conversions, integer widening).
Bollocks.
Reitter: Answering the question: "How do I develop an app for GNOME?"
[2]I'd be interested to see if PHP and bash are outliers in this and if so, by how much.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
They also make programs that are easier to maintain by other developers because they are not overburdened with type information that is either redundant or irrelevant.
Have you ever worked in QA? Do you know where bugs come from? Many many bugs come from statically typed languages when square pegs are pushed into round holes by implied casts.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Unfortunately, C code that meticulously collects the return value of everything that can fail essentially-harmlessly is a real pain in the neck to read, because it's salted either with cast-to-void or with piles of pointless error-checking logic. (I hate reading C code where some coding-standards martinet has insisted that all printf() calls must be cast to void.)
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
-Wno-unused-result exists, according to the gcc(1) manual page.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Enabling the warning for all non-void functions by default leads to code being liberally salted with futile error-checking and/or casts-to-void.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
It was still relatively safe. Explodey programs are bad, but programs which are silently doing the wrong thing are worse. And languages like Javacript or PHP tend to produce exactly such a thing.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
if ( $a == $b && $a && !$b) is potentially true in PHP, and that's just *one* example of the mistakes made while designing this language.
"0"
> b = 0
0
> a == b && a && !b
trueReitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Yeah. We appear to agree. I'm just tired of those people who think that these problems can only be solved (or atleast improved upon) by having a statically typed language.
Python is, IMHO proof that it's possible to solve many of these problems and have a cleaner, safer language while remaining dynamically typed.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Well, actually it's pretty hard to screw up exception handling in Java due to checked exceptions.
Including out of memory conditions?
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
I have a netbook that runs it quite well.
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
I find that higher level stuff is best written and maintained in dynamic stuff while libs and frameworks needs the constraint of statically typed languages (fyi, I've been also programming in perl, ruby and java).
First, I like the language a lot: it has finally brought functional programming to the masses, something that neither Lisp nor Scheme and arguably not even Python managed to do.
From a fan
I expected to see some technical questions in the discussion, instead of rehashing the usual complaints about the language.
Some details
There is surprisingly more discussion of this type in the blog post, something I would not have expected on LWN.net. Some of these points are tackled, some not.
Some details
There are incompatibilities at all levels across JavaScript implementations:
Some details
In practice web devs often assume that the latest version of all browsers have all the standard features -- until they find a feature (or a stupid implementation detail) that completely breaks some old IE version and have to back up. Real world example: IE 6 does not accept trailing commas in object definitions, and it refuses to render any page that contains them.
var object = {
attr1: 'cheese',
attr2: 'runny',
}
Note the comma after 'runny'; a pretty core language feature, and useful I would say. Even the much-hyped node.js has pretty serious limitations in support for ECMAScript 5.
Some details
Reitter: Answering the question: "How do I develop an app for GNOME?"
Reitter: Answering the question: "How do I develop an app for GNOME?"
