3 ms·
It's not so different from writing a Qt app in python. The C code does all the heavy lifting with JS doing the UI bits. That setup is way faster than the DOM be
by hajile 8y ago
It's not so different from writing a Qt app in python. The C code does all the heavy lifting with JS doing the UI bits. That setup is way faster than the DOM because the JS is manipulating native widgets. While that's not as efficient as writing everything in C, it is much faster to write and bugfix and results in more stable and secure code.
- the_af 8y agoI've no problem with javascript being available for desktop development. More power to javascript devs! What I find mind-boggling is that a mostly unstructured, dynamically typed and unsafe language is pushed as the MAIN language for desktop development. Has the world gone bonkers?
- TeMPOraL 8y agoPath of least resistance. JS is what you target if you want to maximize the amount of potential contributors.
- the_af 8y agoLikely. I find it sad that we disregard lots of advances in programming languages that would help us construct faster and more reliable software just because it's not the path of least resistance :/ One or two years ago someone posted on HN a command line tool (let that sink in) for shredding hard disk data written in javascript. It required lots of dependencies to build (!), it was redundant because native tools for this task already exist (!!) and more importantly, it didn't work because the author didn't understand how modern hard disks work (!!!). To me this symbolizes everything that's wrong with javascript: using the wrong tool for a job which is already solved, and solving it wrong.
- hajile 8y agoMost servers run on millions of lines of perl, python, or bash. The same things said about JS can be said there, but most of those things are at least as bad with the added problem that they probably run with sudo privileges. JS is at least as good as these languages while being much, much faster. True dynamically typed code does type checks at runtime which means that performance may suffer, but you are guaranteed to never have critical type failures (the type errors will occur and throw before something actually unsafe happens). This is a huge step up from C which is weakly typed and even untyped via void pointers. Dynamically typed code is still typed. JS is not an unsafe language from a type perspective and from a security perspective, it may actually have the safest language implementations ever created. If we're leaving the dynamic scripting language zone, options are very few without becoming tightly bound to Oracle, Microsoft, Google, etc. There are other great open alternatives (for example, SML would be faster with a great type system), but most of those have small communities (which can mean death to open-source projects).
- the_af 8y agoWhat you say makes some sense. However, do note I wouldn't advocate developing most desktop apps using bash or perl, and even python is doubtful. Yes, I know this can and has been done, but I don't consider it a good idea. Re: dynamically typed code, that's a rabbit hole I don't want to go down now. It's the stuff of flamewars usually. Let it be said I consider dynamically typed languages ill-suited for large or complex apps, for a variety of reasons. Javascript is probably the worst of them all. What I'm asking is this: javascript and its ecosystem are NOT the most suitable tools for developing desktop apps. Why is it then being pushed as the MAIN language for this? Not as an alternative, not as an option for web developers who don't know other languages, but as the MAIN language for everyone coding Gnome apps?