4 ms·
At this point, you should just switch to JavaScript. The desperation to have the simple ease of JavaScript without having to say you're going near "that terribl
by hyperhello 2y ago
At this point, you should just switch to JavaScript. The desperation to have the simple ease of JavaScript without having to say you're going near "that terrible language" is twisting C++ into ridiculous loops. I'm serious. It's like a bizarre Victorian relic now.
- drivebyhooting 2y agoIs JS simpler than Python? I don’t think so but willing to change my mind.
- hyperhello 2y agoThe syntax? Probably a little. It’s a typeless C. As for what you can use it for, it’s limited to browsers, practically, so not really comparable.
- flakes 2y ago> it’s limited to browsers, practically That massively ignores node.js and all of the many popular backend frameworks built on it today. JS might not be everyone's cup of tea, but it is certainly not limited to browsers, practically.
- dingi 2y agoWhich uses JS made for a browser with some modifications.
- friendzis 2y agoWe don't even write utilities in JVM languages, because spawning whole JVM is generally considered too expensive. Yet there are people who will happily spawn whole web browser and even go as far as recommend doing so. All because they can't even write a left-pad function.
- porridgeraisin 2y ago> We don't even write utilities in JVM languages, because spawning whole JVM is generally considered too expensive. This is definitely not why, at least today. People are even willing to spawn an entirely new userspace (docker) for their utilities. > Yet there are people who will happily spawn whole web browser and even go as far as recommend doing so. Electron, like the JVM is nice and cross-platform with no BS. The only problem with the JVM is that it doesn't have a lot of important features/historical advantage that web tech does, not to mention the difference in quality between web UI and Swing, JavaFX, etc,. The combination of all of this is pretty much why electron is preferred. And I guess I should say chrome-tech instead of web-tech. > All because they can't even write a left-pad function Well, they certainly want the functions they write to work on every possible combination of OS/userspace.
- eqvinox 2y ago> Electron, like the JVM is nice and cross-platform with no BS. If we were talking in person I'd look at you like you had 2 heads now. In my bubble it is extremely en vogue to hate on Electron being a piece of bloated shit… …but then again, I will agree that this is a piece of social signaling and would need some actual evaluation. There's probably some real problems with Electron that have caused people to start hating on it, but who knows how relevant those are. Trivial junk can easily snowball into social signals like this.
- porridgeraisin 2y agoOh it has its problems for sure. Especially the bloat. I was just bringing up the similarity in ease of packaging.
- eqvinox 2y agohttps://javascriptwtf.com/ https://javascriptwtf.com/ Arguably this is worse than C++ because for basic things/beginner to intermediate users, the footguns in C++ are more benign (e.g. performance related, rather than correctness) than the ones in JavaScript.
- orphea 2y ago> the footguns in C++ are more benign I don't think I can agree. https://pvs-studio.com/en/blog/posts/cpp/1215/ https://pvs-studio.com/en/blog/posts/cpp/1215/
- eqvinox 2y agoI'm not gonna claim C++ is a great language, just that JavaScript starts its weirdness "earlier"/"lower" than C++. Especially since a bunch of the issues listed on your linked reference are technically UB but compilers (a) can warn about it, and (b) have reigned back somewhat on exploiting UB for optimizations. Now that I think about it, the fact that you necessarily have to use a compiler with C++ is also part of the equation here. It's basically a mandatory linter. With JavaScript as with any interpreted language there's a lot of mines you can trip over waaaaaay down the line, especially if you aren't taking steps to use linters.
- hyperhello 2y agoThe same tired edge cases. Especially the null pointers. Yes, but what did you want the language to do? Stop you? You can do that yourself.
- eqvinox 2y agoHonestly? I want the language to add integers. I don't understand how anyone can take seriously a language that only has floats for numbers. It's straight up ridiculous.
- vlovich123 2y agoAh yes, the language that has no built in support to test if two non-primtive types are equal (& not just objects but arrays of primitives too), that has no proper integer type, whose standard library is thread-bare, and is an exercise in masochism if you don’t transpile it from TypeScript. TypeScript is at least somewhat livable but can we get beyond arguing which terrible language is better?