172 points · by nreece · 10y ago · 257 comments
No, I don't think so. Most people do not use JavaScript since it is useful. They use it since it is the only option available on the browser. There is a BIG difference.
> Creating desktop apps in JavaScript lets developers choose from a vast range of freely available code libraries and frameworks, which takes much of the grunt work out of coding
Lots of languages have a wide array of freely available code tooling and frameworks.
Slightly tangentially though, I wonder if we really really put our mind to it, will we be able to just kill JavaScript ?
I mean, I am sure that there are people out there making a living on JavaScript, but please, take one for the team. Learn something else. I hear it is a hot market for developers.
JavaScript is obviously a flawed language[1] that inspires absolutely bad programming that the rest of us has to deal with. The ecosystem is terrible[2] and the community is full of self-righteous assholes[3] who has the collective attention span of a 2 year old [4].
Let's just call this experiment a failure, cut our losses and just.move.on.
[1] https://www.destroyallsoftware.com/talks/wat
[2] http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
[3] http://atom-morgan.github.io/in-defense-of-douglas-crockford
[4] https://medium.com/@ericclemmons/javascript-fatigue-48d4011b...
1) JavaScript has its warts and its gotchas like anything else (okay, maybe a few more). So what? Spend 50 hours building anything substantial with JavaScript and you'll get a good handle on them, and you'll be good to go for the next 10,000 hours. Same goes for just about any other language. Focusing on the weird edge cases might make for a nice blog post, but it's not relevant to people actually building things day to day.
2) Growing pains in a very active community? Unheard of! Okay, so this was embarrassing and disappointing, but at least it's been dealt with. You can keep pointing to it if it helps your argument, but that doesn't make it valid.
3) I don't really understand what point you're trying to make here.
4) Again, very active community. Lots of churn. Plenty of reinventing / rediscovering the wheel. If that _really_ bothers you and you're struggling to separate the signal from the noise, I at least understand and respect that criticism. I don't think that's a reason for anyone to stoop to the level you have, though.
Spending 10,000 hours building things with JavaScript sounds like a pretty good definition of Hell.
JavaScript is an actively, abusively bad language. It's not that it has a few warts: it's nothing but warts. Its fundamental design flaws are obscured only by its superficial design flaws.
It's a really bad, tasteless language.
> I don't think that's a reason for anyone to stoop to the level you have, though.
I really don't think he 'stooped' to anything.
(But yeah, compared to languages that were designed over years obviously it's incredibly bad.)
To quote Eich (from here[1]):
" Ten days to implement the lexer, parser, bytecode emitter (which I folded into the parser; required some code buffering to reorder things like the for(;;) loop head parts and body), interpreter, built-in classes, and decompiler. I had help only for jsdate.c, from Ken Smith of Netscape (who, per our over-optimistic agreement, cloned java.util.Date -- Y2K bugs and all! Gosling...).
Sorry, not enough time for me to analyze tail position (using an attribute grammar approach: http://wiki.ecmascript.org/doku.php?id=strawman:proper_tail_...). Ten days without much sleep to build JS from scratch, "make it look like Java" (I made it look like C), and smuggle in its saving graces: first class functions (closures came later but were part of the plan), Self-ish prototypes (one per instance, not many as in Self).
I'll do better in the next life. "
[1] Edit: jwz.org intercepts HN links. See mjgoeke's comment.
> I don't think he 'stooped' to anything
Really? This is supposed to be a place for civil, mature discussion. There are plenty of valid arguments against javascript as a language and as a community, there's no need for childish comments like that.
At a higher level of organization, the language begins to matter less and less, and what matters more are that subcomponents within a larger system obey their contracts, and that there's some concurrency strategy if you have distributed state.
It's really not that bad. It's actually a good language, and getting better all the time. See? We can go back and forth, without any substance.
But seriously, modern JS is not that bad.
I don't mind MY JavaScript. It's everyone else's that drives me bonkers. Tracking down things in JS is a timesuck of epic proportions. Much of the time, it just isnt't any fun.
You should look into typescript, it has helped us quite a lot with that particular matter.
I think you mean your codebase rather than JS. There are plenty of industrial JS codebases where this is not a problem.
This is really sad, a whole industry that was once inspired by Unix philosophy and was supposed to be beautiful and fun, is now conquered by languages like JS, php, and Java: so ugly and so not fun.
I always thought programming should be something you do cause you like it, not because you're forced to do it. If you use JS cause "everybody else uses it" and "it pays more", then I'm sorry, you're screwed. I thought CS industry belongs to developers, not tech giants (Oracle, Microsoft, ...) who force Java and JS on everybody.
Someday, some body will stand up and say "Enough is Enough".
Edit: If you want to downvote, at least please tell me why I'm wrong...
Why call out Microsoft? They aren't forcing Java or JS. They came up with C# and Typescript instead.
I can't speak to Typescript, but C# is way more fun to write than Java. It's not particularly interesting or glamorous, but it is nicer to write.
The problem with "just calling this experiment a failure"—why that won't work in practice—is that JavaScript is not a failure. It's extremely successful.
Strict mode and linters do not fix everything. This is doubly so if your developers ignore the warnings and errors that the linter throws. The language isn't inherently bad, but plain old JavaScript is not beginner friendly for new developers. It requires the discipline to not just throw things together.
[0]: https://dorey.github.io/JavaScript-Equality-Table/unified/ [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Perhaps not a bad language, but I do think it falls into the same category as PHP - just good enough.
It's just good enough to do what we want it to do, and given the lack of choice, we're willing and ready to pile abstraction upon abstraction upon it to try and reduce the pain involved with getting work done.
And like masochists, we look at the results and go "Well, that didn't hurt too bad this time, so I'm willing to go do it again."
Wait, do you mean to imply that "passing silently with a weird result" is somehow better than throwing a verbose, descriptive error?
You're not contradicting what you are replying to. People are using Javascript because it's the only option, but it is useful to have a lingua franca.
I just wish that lingua franca wasn't Javascript.
I know someone who's wished for "one language to rule them all" for a long time and wants/wanted that to be Visual Basic... It's a matter of perspective as much as anything else.
JS can be a very beautiful/expressive language... and mocking some of the corner cases of coercion doesn't really help the argument. JS started as a language for input validation first... it works in a way that input validation passes/fails very cleanly. It makes it a great transport/middle-man language actually.
The issues of: "utility of lingua franca" and "ubiquity of Javascript" are orthogonal issues.
It seems everyone agrees that Javascript would not have been the first choice of language. There is no short argument there, you have to go out and try at least one other language and compare them.
However, on the second question, I don't see why it is useful to have a lingua franca.
Multiple languages arise out of multiple needs. You want a superfast language for your OS, you want a quick high level language for quickly examining data, you want a language that describes visuals and so forth.
What are the benefits of a lingua franca for the internet, or any other domain? They still get to exchange data in an agreed upon format.
Even getting interoperability between JS and C++—what the browsers do to implement the DOM—has been exceptionally difficult, with innumerable security vulnerabilities resulting from this.
Why?
Just because undefined is not a function [0]?
[0] https://twitter.com/vikasgorur/status/744204277745254400
No. I've never understood the anti-[language] viewpoint. Wouldn't it be great to have every language available in every ecosystem? Why bother with web assembly when we could just replace JS with python because that's what _I_ want.
[1] Let's be honest, This is every language. There are some stupid, stupid, STUPID parts of JS that everyone enjoys pointing out. And... since everyone points them out, nobody actually uses them.
[2] It happened and they changed the root cause within a week. I would view that as a pretty good ecosystem. Now take a look at python 2 vs 3. Almost 8 years later, and we still need: http://py3readiness.org/
[3] Every language.
[4] Just because people talk loudly about something, doesn't mean most people use it. 90% of the internet still runs on jQuery: http://trends.builtwith.com/javascript/javascript-library
You see, you don't have to like everything about it to enjoy working with it. I pick the stuff I care about and put my positive energy towards it, instead of my negative energy towards the other. You should try it. You're free to make whatever tools you use right now as easy to use and as quick to learn. Maybe if you try hard enough, us Javascripters might come join your side.
For [2] and [4], they are issues with the ecosystem, which I suppose it related but isn't strictly js, ie., you don't have to use React (shock). For npm, at least that issue has been addressed.
[3] is a social issue...it happens in many places. Can you claim that the university system is flawed due to similar attitudes of students who attend university?
The challenge is navigating such ecosystems in a selective and informed way, which is a programming skill in itself.
Humans that "really wanted to" landed on the Moon, brought hundreds of millions of people out of poverty, cured polio and brought down Communism.
The real problem is that you'll never get that many people to agree on something like killing Javascript and creating something radically superior (whatever that is). The web ecosystem is proof of the highest level of agreement possible on a wide scale.
And to be honest, what's the alternative? If Javascript dies, we won't get a great new common programming language. We'll get 10 mostly walled gardens with barely any compatibility. Unix vendor wars, post-web edition.
Maybe it's the only option available on the browser because it is useful to have a lingua franca for the web.
Now that JS has seen 2 new versions in 2 years, momentum has picked up and it's keeping up with the times much more so than in the late 2000s when its flaws were glaring and apparent. One of the interesting side-effects of the extra effort going into the web platform is the 'wasm' effort [2] which could replace Javascript at some point -- yes, the usual caveats about GC and DOM apply, but they're coming [3][4].
Though the political line is that wasm isn't intended to replace Javascript, once it attains feature parity (like it's headed towards), it'll be trivial to do so, regardless of what the designers intend. When that time comes, JS will probably still be used as a written language, but wasm will become the new compilation target.
[1] https://en.wikipedia.org/wiki/ECMAScript#4th_Edition_.28aban...
[2] https://webassembly.github.io/
Where I live JS jobs are some of the highest paying actually. If anything people are moving to it.
Kill maybe too string a word (languages that reach the level of usage of JavaScript tend to stick around regardless of what's currently popular), but for me the main promise of WebAssembly is to allow web browsers to branch out from JavaScript as the only native programming language of the web (as well as improving performance).
> No, I don't think so. Most people do not use JavaScript since it is useful. They use it since it is the only option available on the browser.
Are you not contradicting yourself here? If people use JS only because it's what's on the browser, then it's only because people see value in ... having a lingua franca for the web.
- People are stuffing websites into Electron and packaging it as a native application
- HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience
Although the article doesn't say it, this seems to imply that:
- Full-native development unique on each platform is considered too much effort, when you can get a cross-platform app with Electron
- Other platforms are not very 'hackable'; why is this?
Is this purely because JS has a higher mindshare and marketshare than [preferred platform language] on [preferred platform toolkit] on [preferred platform], or do HTML/CSS/JS applications actually tend to hit a sweet spot in terms of separation of presentation, view logic, business logic? Or is it about the view-understand-edit-deploy lifecycle being easier with HTML/JS apps?
I think that's related to the high fault-tolerance in Javascript. A good developer is good in any language, so she can work with Javascript. A beginner or even a bad developer can make things happen in Javascript, when that is not always possible in other languages. So the entry point level is so low that a lot of people is using it.
> Other platforms are not very 'hackable'; why is this?
I prefer strong typed languages. I use TypeScript when I have to do some JS work as it is easier to maintain in the long term. But that means that you need to know what you are doing before starting to do anything. Compile, fix errors, repeat.
I can see that for starters JS is more fun and "hackable", as it was BASIC for me when I started.
> I think that's related to the high fault-tolerance in Javascript.
Also, in Electron apps you can access the Chromium Dev Tools directly in the app (unless the app author has disabled it). Chromium's Dev Tools are pretty much the gold-standard for hacking during runtime.
... if you don't include any IDE with a built-in debugger.
1) http://programmers.stackexchange.com/questions/221615/why-do...
...Because it gets the hell out of they way and holds your coffee for you and doesn't slap it out of your hand and throw a tantrum because it was actually a medium coffee...and it gives you the simplest no-BS object/array literals you can get...IMO opinion everyone wailing and beating their chest bemoaning the fact that JS got where it is fails to understand that it got there because it the "UX" of coding JS is just a lot more pleasant - and you can treat it as a compile target and do your work in a more type-obsessed thing like Typescript if that's your cup of tea without imposing on the underlying "hackability" of the language.
I really don't think that:
{
"foo": "bar",
"baz": ["quux", 1, true]
}
is simpler than: ((foo bar)
(baz (quux 1 true)))
Quite the opposite, really. [["foo", "bar"], ["baz", ["quuz", 1, true]]]
making it a non-issue?In practice, you can use as much or as little typing as you want, and the compiler will occasionally tell you "I think you're doing something dangerous here", but even then you're only one <any> away from ignoring its generally good advice (or more sanely, you would annotate the ambiguous bits a bit better so typescript understands you really meant to do that.)
But otherwise, all the usual js hacks still very much apply.
Anyway, that's why typescript is my cup of tea|coffee.
Is it pleasant UX that you can put petrol in your diesel car because the nozzle fits? Would it be pleasant UX to have your bank let someone withdraw money from your account without ID? Bleach bottle with no safety cap?
Also the laid back kid of JS will throw a tantrum if the coffee is not a coffee. He'll throw the tantrum at your customer though (at runtime), not your developer (at compiler time). Which arguably is a good UX for coding but not the bottom line.
I like that the kid just holds the cup and pours it when I tell him to. If I wanted him to pour coffee and gave him a cup of beer, I'm ok saying that's my fault. I'd still rather have the kid. Having a guy that only accepts "Large cups of coffee" is necessary at lower levels (c), but keep it out of my scripting language.
Yeah, and good luck dealing with that remote API that now gives you an extra field in the JSON or XML, and your compiled client in a few thousand workstations needs to be updated and redeployed because of said fit.
Yes, it's this. Full native development is awful since every platform is completely different, and other cross-platform solutions like Qt are a bit behind the web in terms of modern look and feel and developer base.
But Electron is also awful, since a hello world app uses 100mb of RAM.
Desktop GUI app development is horrible... meaning it's slightly worse than mobile GUI app development. GUI development in general is a horrid ghetto where your choice is between bad and completely proprietary.
Is it that awful, though? Most computers come with 4-16GB of RAM.
Furthermore in the attempt to woo developers from one popular platform to another a myriad of solutions will appear to allow the developer to move their existing tools, methods, and general knowledge from their comfortable and familiar platform onto the new one.
I'd suppose anyone that has more than 5+ years experience and has moved between at least two types of platforms can point to examples in their mind.
Personally I dislike this habit of using tooling to solve platform movement and escape the time constraints inherent in learning to develop for a new platform; I can however see the attraction, because, it really does ease time and effort in learning something new even if to provide this easing it acts a buffer to any deep understanding of the target platform.
For instance, when FB used React Native for building one of their ad manager apps, they had 87% code reuse between iOS and Android (https://twitter.com/brindelle/status/618114397098102785) The implications that has on a company's eng organization are huge.
Another example is the code sharing between client and server in Meteor. That has big implications too.
The main reason Javascript is winning as the lingua franca is that it's pretty much the only language you can use in a browser. The main alternatives are things that compile to JS, like Babel, TypeScript, and for a while Coffeescript and Dart were gaining traction too. If browsers could run, say, Python, I suspect you'd see more Python used in this way as well.
I agree, but it is my experience that this always comes with a downside that you don't know some of the platforms you are running on and there are deficiencies. The Native is better argument
[1]: one of many boilerplates - https://github.com/chentsulin/electron-react-boilerplate
Patching the byte code and having it run is a little tougher...
I don't get why people don't understand its popularity.
HTML lets you put boxes on the screen and CSS lets you paint-by-number(id/name/selector).
If you aren't doing any of those things, I am very curious to know what exactly you are doing.
x += 2;
call(param);
data.key = cache[0];1) HTML/CSS/JS is sill the only truly cross-platform (mac/windows/linux/web/ios/android/etc.) UI platform/ecosystem in 2016, and it will probably stay that way in the foreseeable future because OS makers love their walled gardens.
2) An app's memory efficiency is not a top 10 priority of an average solo-or-small-team developer's concerns, because that's not what most users pay for.
Electron/NW.js apps will only become more common, so I hope things will improve with asm.js/webassembly/etc.
Or the other way: start out with a native app on the platform we most care about + a web app for "access from anywhere".
I love Python but people over state its benefits and effectiveness.
C# might even cover that now.
But when I think about software as a business rather than an art, I have to concede that it's a very rare circumstance where RAM efficiency matters as much as I'd like. Note the way the cost of memory has declined:
http://www.jcmit.com/mem2015.htm
Watches now have 100,000 times the RAM that I started with. Costs are dropping by 1-2 orders of magnitude per decade. Something that is absurdly wasteful now could well be economically reasonable very soon.
Most of the applications I work with today do a lot, that's true, but their UI latency is often worse than it was on my 7.16Mz M68000 Amiga 500, and other things as well are just slow.
I've mentioned here several times in the past that on my laptop I can "boot" Linux-hosted AROS (so the problem is not the Linux kernel, nor X) with a custom startup script to boot it straight into a full featured, scriptable text editor in less time than it takes to start Emacs.
I'm sure it's possible to tune my Emacs setup (for example, I found out by a fluke, that the default Emacs setup on debian will wait for a DNS request to complete or time out before it starts - break your DNS setup and Emacs will hang for ages) or pick another editor (many of the other ones I've tried are either just as slow or feature-limited compared to the Amiga editor in question - FrexxEd, co-written by the same guy that started curl), but the point is that we've come to accept the kind of slow startup and UI latency that was unacceptable back then.
E.g. people spent weeks tuning and trimming AmigaOS commands to make them the smallest possible so we could make as many of them as possible RAM resident to avoid the tiny fractions of a second it'd take the load-time linker to load them.
I'm happy we don't need to think that much about the RAM any more. But we do need to think about the latency.
There's the attitude that we should just throw servers at this instead of developer time. That's fine when you can compensate by e.g. throwing more RAM in and/or a program is run relatively rarely or where paying for a beefier server in some data centre can achieve the same performance. But it's not true when latency grows into user noticeable levels because you can't get high enough single-core performance, and that program is run a lot.
On the other hand, I've been frustrated with the slowness of computers for a long time. CPU speed, RAM, disk, everything has gotten way better. But I'm still just about as irritated, and I suspect that things are just about as sluggish.
Again, I think it's an economic equilibrium. Things are fast enough that most people buy them; those of us who want things faster aren't numerous to outvote those who want fancier features or cooler UI bling instead.
I hope this changes, but I'm not holding my breath.
Extra weight will always matter for people who want to deliver first-rate user experiences.
Even well-written Web applications tend to use more system resources than their well-written desktop counterparts. A few days ago, I was surprised to find that Chromium was using 6 GB of RAM, while all other processes combined (including three Emacs instances, running fancy modes) were using just 1GB. And, no, I wasn't playing browser games or doing anything fancy in Chromium: just viewing text and images.
> And at least with a chromeless-browser-pretending-to-be-application you have the protection of the browser process sandbox so an app that goes awry isn't going to take your computer down that badly.
It would be much better to use programs that don't need to run in a sandbox in the first place. (To be fair, OS-enforced memory protection can be considered a kind of sandboxing too.)
The difference is there is very little room for optimisation in most javascript runtimes. They don't support multi-threading and the memory is impossible to manage. "Lower" level languages always allow better performance tweaking when necessary. Javascript allows next to none. You can't tell javascript :"Give me an array of 10 elements", or "give me a integer of that length". So no "headroom" for performances with Javascript.
Yes, they do, via Web Workers. They just don't support multithreading at the level of concurrent access to the DOM, and they don't support shared memory. Very few native libraries support concurrent access to UI widgets, and not many native applications make heavy use of shared memory for compute either. (Most native applications don't have heavy compute needs in the first place…)
> Give me an array of 10 elements
new Array(10)?
> give me a integer of that length
Uint8Array, Uint16Array, Uint32Array?
Nonsense. There are plenty of strategies for managing memory efficiently in JavaScript. Yes you can't do a C++ level of allocation, decallocation, etc but you most certainly can manage the amount of memory your code uses.
Plus there are alternatives to threads. Look at the state of Atom or VSCode. Much progress has been made in terms of perf and these are not trivial applications.
I know we have 8-core laptops with 16 gigs of RAM, but, still, it's excessive.
The justification for using JavaScript for server/desktop/mobile applications seems to essentially be that a certain large group of programmers only know JavaScript.
My bet would be that languages specifically designed for the JS ecosystem (whether JS itself or something like CoffeeScript or TypeScript) will continue to be the most popular for writing most of an app, with some apps dropping down to C or C++ or Rust compiled to wasm for a subset of performance-critical code.
Which is also why I think the emphasis on JS is wrong: the main selling point of these technologies is NOT javascript, is HTML5/ CSS. Javascript is just a (very handy indeed) scripting language like any other: frankly the logic and requirements of most applications around are not complex enough to justify the usage of anything more solid or complicated than that. Just today I was contacted by a former colleague, a Java developer, asking advice on using Electron to develop a quick desktop application.
On the other hand, there is a long list of languages that transpile to javascript. So where are the masses of serious C#/ Java/ <pick-your-language> developers using transpilers to write the logic of their web applications?
Also, while fancy runtime systems can improve the performance of dynamic[0] languages, it doesn't come for free: the price to be paid is the loss of elegance. For instance, a JIT compiler could inline a virtual method that seems not to be overridden anywhere, but if later on it turns out that the virtual method was overridden somewhere, the “optimization” has to be undone. How can anyone in their right mind trust a language that requires such dirty implementation tricks to achieve decent performance?
[0] By which I mean “less amenable to static analysis”, regardless of whether the language has a static type system. For instance, Java and C# are dynamic languages in this sense.
trust a language that ...
Where's the problem?JIT compilers work. Most high-level languages require compiler tricks for achieving performance from Scala to Haskell to Prolog.
It's useful to distinguish between (1) having a clean, easy to understand semantics and (2) having a fast implementation. Use all the hackery in the world to get your language fast, as long as it's abstract semantics is easy and canonical.
To make things perfectly clear: I'm not against optimizations being performed automatically by compilers or runtime systems. What I'm against is unclean designs: deliberately performing an unsound optimization and then rolling it back is an unclean design.
> Use all the hackery in the world to get your language fast,
The language implementation is a program itself, and I don't have any good reasons to trust a hackish language implementation any more than I trust other hackish programs - that is, not at all.
> as long as it's abstract semantics is easy and canonical.
Hah! This thread is about JavaScript.
Isn't this a rather broad brush with which to paint all JIT language implementations, including Java, C#, and, say, PyPy?
(FWIW, I'm not saying it's impossible. It's perfectly possible, but you'd need a source language that offers much better static guarantees than the typical language that a JIT compiler is written for.)
---
Sorry, can't reply to you directly, because “I'm submitting too fast”. So my reply goes here:
> for the simple reason that type systems cannot capture all relevant runtime context.
Type checking isn't the only kind of static analysis out there. And there's no need to use statistics to optimize anything at runtime when your ahead-of-time compilation step already emits optimal target machine code.
> Java is a good example here, since it's strongly statically typed.
Java is as dynamically typed as it gets: `instanceof`, downcasts and reflection, all conspire to reduce the usefulness of static type information to zero.
> By your reckoning, all greedy optimizations that CPUs do like branch prediction and prefetching are also similarly 'inelegant', because they can be wrong and require rolling back.
Yes, indeed. It's more elegant to know beforehand what exactly you have to do, and then do just that and nothing else.
The Universal Windows Platform also has a JavaScript API that is a breeze compared to the old Win32 development process.
Electron is good but just the tip of the iceberg. I think it says more that major OSes have bet their future on JavaScript.
Not wanting to know WTF a JS interpreter was doing inside the window manager, I wiped kubuntu, installed plain debian and now I'm happily running xfce on my desktop too.
Of course now someone will tell me that xfce has also been similarly infected...
You mean gjs which is a poor javascript runtime. And Gnome is largely powered by C more than javascript. You may use javascript because Gobject-introspection which is also available for perl and python.
it's really becoming like java. pushed every, but the wrong choice on many occasions.
That's not saying much since Linux is pretty much nonexistent on the desktop.
If I'd somehow opened all these as tabs on Chromium, they would plug into Chromium's already-allocated shared data structures and the memory consumed would be quite lower. I can have Facebook Messenger, Deezer and Gmail open alongside 10+ other tabs at all times, but once I start Slack and Viber alongside Chromium (or Skype for Linux Alpha, or Visual Studio Code, or Black Screen, or any of these trendy hybrid-web-desktop apps), Linux starts screaming and swapping things around; as a result, everything becomes sluggish.
Also, the apps themselves feel a bit laggy even when they have all the memory they need. I know the comparison is not fair, but using, say, Code::Blocks or QtCreator (which are full-blown IDEs) with Atom, I can feel input response differences for some reason.
I have a low amount of RAM on my home PC and I plan on upgrading it, so you can say that my hardware is the problem, but clogging up memory like that is always a waste.
As a test, I just opened Popcorn Time. Right after startup, it uses 200MB of resident memory. The whole GNOME shell + the Xorg process consume around 280MB combined on my PC. That's insane. Yes, it looks beautiful, but it's nothing you can't do with Qt these days. It also supports JavaScript. QML is not hard to learn. It's available for Windows, Linux, OS X, and even mobile. Ditto for GTK+ 3: Vala is beautiful, practically C#, and good enough for at least the UI layer of your app, if not for the whole thing. Qt and GTK+ are both open source and LGPL, which means you can freely link to them even if you develop proprietary software.
I just don't see such a need to make today's apps so bloated (and I don't consider "people have enough memory nowadays" a valid argument). If it's an one-off app made by a small team, or for fun, the trade-offs may be worth it. But for Slack, or Skype for Linux, or VS Code, wouldn't it make sense to put more developer time on it and have a much more performance-conscious application?
I'm curious on how you know this before you even purchase? For example, the Mac app store can have both native and electron apps? You wouldn't know it's native or not until after you purchase it?
I don't understand why people like this language. I am sure it has it's uses etc., but come on, if you want to build a reliable, easy-to-reason program, using JS is just running up a escalator that is going down.
https://abdulapopoola.com/2015/09/30/why-javascript-seems-to...
http://rhodesmill.org/brandon/2012/js/
http://dorey.github.io/JavaScript-Equality-Table/
https://www.destroyallsoftware.com/talks/wat
http://blog.chewxy.com/2014/01/27/javascript-wat-again/
I can see using js as a target language with a 'transpiler', but JS is just a shitty language to write code.
it still does, AIR v1.0 was in 2006, we are now at v23.0
Electron is nice but a whole browser engine is a big bloat, you can easily reach 150MB.
Not to go into a debate JS vs AS3, but the AIR runtime have a lot of advantages : AS3 the language is one, the default native API cover a lot of ground, being able to extend those native functionalities with ANE (ActionScript Native Extension) is nice too.
I don't buy the kool-aid that you could use the exact same HTML5/CSS/JS code for both the browser and a desktop app, unless the app is trivial you gonna have to build your UI/UX specifically for the desktop with all the different subtleties between different OS.
So sure you can use something like Electron to easily wrap an already existing web app for the desktop but imho either you are limiting the desktop features you could add or you will soon end up having 2 code base: 1 for the web and 1 for the desktop and that require more resources than just "wrapping it up for the desktop".
When a business needs to deploy to several platforms at once, it's a quick and success-proven model that still has good performance.
Is possible to have a more lean setup?
Apart from that, I agree with you. Static typing is a core tool for helping me manage complexity, and I wish I got to use it in my work.
Javascript just being there early wasn't enough. I has improved remarkably over the past 20 years, and the ECMA standards body has been critical to that improvement.
That said, it's still a quirky language and that alone makes a lot of people feel they can't rely on it.
JavaScript had prototypes and closures from the beginning, no? Does it really have generics — a quick Googling makes it appear that it's a matter of hand-rolling. But it's been awhile since I've written JavaScript in anger, so perhaps I've missed an announcement since then.
No one wants to maintain a web app, mobile app, and desktop app separately.
I'm pretty sure English is still the English of languages.
JavaScript might be the English of programming languages, though.