by PerryCox · 9y ago · 0 comments
Maybe it's because I've never been a webdev but I just don't understand the fascination with JavaScript. Personally I hate JavaScript any time I have to code in it. Give me literally any other language.
iteration time is orders of magnitude faster than any C/C++ project I've ever worked on.
I hated JavaScript at first because I didn't understand it. It took about 2 year to stop trying to turn in back into C++. It didn't help that my first real intro was in an environment that used Google Closure and the closure compiler both of which were designed by Java programmers to try to treat JavaScript as Java and disallowed real JavaScript.
now I mostly loath going back to C++ and having to fight the dev tools on each platform which seem to change every 5 years such that all old samples fail.
is it JS perfect? no, i think I kind of miss static typing but not always. It's often a joy to just do it.
Instead you get to fight with often poorly-versioned bower/npm dependency hell, and gulp/grunt/webpack config errors with inscrutable messages.
> having to fight the dev tools on each platform which seem to change every 5 years such that all old samples fail.
Such stability! If anything in javascript still works five months later, I count my lucky stars.
https://yarnpkg.com/lang/en/docs/yarn-lock/
JS development without yarn is complete madness.
We have something like that,
node_modules for some project goes to a rpm called $project_name-devel
and the result goes to $project_name
Is not really that complicated and then we don't rely on anything outside of our control (e.g: github, npm)
We never had an issue with this workflow. Our dependencies (the devel package) changes maybe once every two months if so?
That's like saying that chalk tastes so much better and is so much easier to digest than gravel. However, it's good to be happy with a language... so if it works for you, great!
I get formatting, styles, animation, for free. I get cross platform graphics, video, and audio for free
That is only true if by "for free" you mean you (or your users) get to exchange an oversized portion of their free memory and CPU cycles for those things. Better hope those users have at least as powerful a system as you do or they'll be looking elsewhere for their text editor, cooperative workbench or IDE.These downsides only appear when you’re working on project that did it wrong way. Thousand-line autogenerated makefiles, pkg-config-unaware craplibs with headers based on different basedirs (Qt, I’m looking at you), idiots who think that using cmake/qmake/etc will magically ensure buildability on different platforms and never ever test that it does build there.
In pure js you don’t have include/dependecy problem simply because there is no require/include option at all. Then you install node/npm with 100Mb of js backing it aaand it is yet another complex toolkit to learn forever. With no man pages and shady internet snippets. My hate of js comes from different direction though — I know it and it is ugly simpleton that dooms you to boilerplate, polyfill and spaghettize everything. Debuggers help until you get a “framework” that turns everything upside down and whirls.
I’m sharing your every 5 years annoyance though, even non-web does too much change for the sake of change. No good ui also, you’re right. This comment was meant to be a counter-argument, but it appears that both worlds are crap.
1) It's the only true "write once, run everywhere" language out there (along with languages that transpile to JS).
2) npm
3) Asynchronous I/O
Simply put, Javascript is the only language in the browser.
Recently there has been hype and explosion but web development (development on the browser, which means Javascript for lack of alternatives) had a long way coming.
Asynchronous, parallel or progressive io existed since forever, and barely is an exclusive property of js. Moreover, it is not required from application programmer, unless the platform is built in a way that it is impossible to avoid.
Sure, until your pointer size varies from platform, or LONG is 64bits on one platform and 32bits on another.
Don't forget compiler support, which version of C are you using? Does the compiler support it everywhere?
C runs everywhere with sufficient #IFDEFs.
You can argue that these restrictions allow less freedom of expression and more quirks in some cases, but the same applies to js without polyfills and babels, because these are effectively ifdefs and compilers. The one main difference is that correct C code actually can be deployed to a variety of platforms unavailable to javascript, which is runnable on just few selected powerful environments with heavy help of what is called compat-libs in non-web world. Moreover, with all these compat layers you cannot just take js code and use it in non-hosted environment; that’s why everything runs in embedded node/webkit. This is barely portable, and I think you’re confusing [seeming] ubiquity and with actual portability (like “everywhere”).
Yes, that's a trade I'm always willing to do. I'd rather use those couple of hours to write something new or spend some time with the family. "left-pad" was a minor annoyance that was quickly resolved.
The Stockholm syndrome around using browser technology everywhere, just because you've been brutalized into learning its wrinkles to work on the web, is scary.
clone this repo, follow steps at bottom of readme, ship on 3 platforms
If all you need is an action button to trigger some underlying code, then those hello-world products are very simple.
Electron is NOT that easy to use of a platform. In fact, it's quite technical and requires a lot of knowledge about node and HTML/CSS. It requires that the developer understand you're running a node process that feeds its results to a browser that has a native chrome.
Visual Studio Code and Slack for example have native plugins that light-up the various platform's features. So you're never completely guarded from having to write native code. At the end of the day it's just another UI toolkit and language choice you can make when building out your software.
And yet, this hypothetical person wants to write an Electron app to run on desktops?
I don't get this argument. If you are good enough to understand how to write and deploy an Electron app, you should certainly be able to understand Eclipse.
Note: I'm not advocating for Java here...
But Electron is a there for a different reason. I can convert my SPA to a working desktop app with minimal coding (same Css/js front end/ja backend, if you use nodeJs). And even it works for all major platforms. So I literally have one codebase for web and all three desktop platforms.. beat that!
I know it's not optimal to have everyone open a chromium instance under the hood but how bad is it from JVM?
And with Java, I have the option to have an actual binary, 100% native code, if I feel inclined to do so.
Something that many Java haters keep being unaware of.
I'm torn between JS and PHP for the language I have the least fun programming in.
Native lexical scope. Do more with less and write/test it in a fraction of the time. Seriously, a couple of rockstar JavaScript devs could easily replace a large department of equally skilled Java developers.