Ah, well that’s great for folks who already know or want to learn Rust
Principal Engineer for Accumulate
Ah, well that’s great for folks who already know or want to learn Rust
I seriously doubt that a dual-language platform is ever going to supplant Electron. Electron has the major advantage that the entire app is written in one language. And according to Stack Overflow’s 2023 developer survey, 66% of devs use JavaScript, 45% use Python, 43% use TypeScript, and 12% use Rust. More devs use Java, C#, C++, PHP, and C than Rust. So 2/3 of developers wouldn’t have to learn a new language to use Electron, and only a small fraction of the remainder knows Rust.
Sure, there are worse languages and environments to get stuck with. But I can avoid those jobs. And if I get hired as a SomeLang developer and they force me to work in Java or whatever, it’s time to dust off the resume.
I am aware of that, but Java is the most popular language that runs on the JVM. I don’t specifically dislike other JVM languages, though one of my issues is type erasure and that’s partially a limitation of the JVM.
Obviously OpenJDK is superior to dealing with Oracle’s bull. But even more superior (IMO) is simply not using Java. My life has been noticeably more pleasant since I started refusing to touch Java.
You consider calculating the hash of a few bytes to be heavy lifting?
just use
await
in anasync function
.
Sure, I’ll just put await
and async
everywhere. Oh wait, I can’t. A constructor can’t be async so now I need to restructure my code to use async factories instead of constructors. Wonderful…
async/await infecting all of my code, being unable to create a get myField()
method that involves a hash calculation. It may be standard to do heavy lifting concurrently, but async hash functions are certainly not standard in any of the languages I’ve used (which is quite a few).
That seems like a good guess, I can see why async hashing could be useful. But it would be nice if there was an alternative API that was blocking so my code wouldn’t get infected with async/await all over the place…
“Flagged as spam”, “Publication Not Available”. I can’t see the article.
True, but if you read the article the point is clearly not about source code vs non-source configuration. There’s an implicit assumption that source code is something the developer will be modifying as time goes on, but the real point is, “Don’t make users merge changes.”
I think the author’s primary point is, “Merging changes sucks, don’t make your users do that,” with a corollary: if your program loads configuration from a directory that is only populated by the user, there’s nothing to merge and thus never any merge conflicts. Case in point: /etc/polkit-1/rules.d
. I can add whatever rules files I want in there and they’re never going to conflict when I update. If PolKit makes breaking changes to the format, it will log errors somewhere and I can look at those errors, look at my rules, and figure out how to fix them. That’s a hell of a lot easier than merging conflicting changes to code/configuration.
Additionally, switch performs extra sanity checks that checkout doesn’t, for example switch would abort operation if it would lead to loss of local changes.
What checks? Under what situation does checkout lead to loss of changes? If I make changes and attempt to checkout a ref that would overwrite them, I get the following error:
error: Your local changes to the following files would be overwritten by checkout:
some/file
Please commit your changes or stash them before you switch branches.
Aborting
To my knowledge it’s not possible to overwrite changes when switching branches/refs (git checkout <ref>
without any other arguments or flags) so I guess what the author really means is, “If you use checkout incorrectly you can overwrite local changes.” As far as I can recall I’ve never accidentally git checkout <ref> <some/file>
so I don’t see a reason to retrain my muscle memory. I do use git restore
since it’s behavior is a lot more obvious than checkout/reset though sometimes I still use git checkout <ref> -- <some/file>
because muscle memory.
Also setting up a worktree is really easy. git worktree add ../hotfix prod-branch && cd ../hotfix
and get working. Though in reality it’s cd ../hotfix && git checkout prod-branch
because I’ve never needed more than one secondary worktree.
I think the degree of footgun danger depends a lot on the language and the application. I agree that C and C++ are dangerous until you really know what you’re doing, though IMO most of the danger comes down to memory management and that’s a portable skill, once you’ve learned it. That being said, I don’t have a lot of experience with C++. C was my first language so I’m used to plain old normal boring pointers (are those “dumb pointers”?) and I’ve never understood why C++ needs 9 billion types of pointers.
Go has one particular footgun - loop range variables. Other than that, IMO high-level, garbage collected languages don’t have major footguns like that. My first job was writing a bespoke inventory system for a manufacturing company, and I wrote it in a language I’d never used before - C#. In five years the only major issue that had was due to my inexperience with SQL and had nothing to do with C#. And though I haven’t written nearly as much code, I’d say the same about Java, Ruby, Python, and JavaScript.
As my first job out of college (when I didn’t know what I didn’t know) I was hired to build a bespoke inventory system for a manufacturing company. My prototype became a production system the second I showed it to one of the engineers. The next three months of my life were a living hell as I frantically fixed bugs on a live system. Lesson learned.
Counterpoint: knowing a programming language doesn’t matter if you can solve problems. A competent programmer can pick up a new language and be productive within a few months. That is, a new language within the same paradigm - going from a imperative language to a functional language can be a drastic shift, but going from one imperative language to another is easy. If you can’t do that as a intermediate to senior developer, you’re not a competent programmer IMO.
The real skills of a good programmer are things like problem solving, debugging, understanding how to write readable and maintainable code, etc. Having deep knowledge of a specific programming language or languages is helpful and enables you to work faster, but if you’re only a skilled developer in the languages you know - if you aren’t capable of pivoting those skills to another language - you aren’t a skilled developer IMO.
Linus might be an asshole but he’s actually competent. Elon Musk is a fucking joke of a person. Not to mention Linus hasn’t done anything that compares to things like Elon suing his way into being a “founder” of Tesla and kicking out the actual founders.
I could use Google but I’m looking for opinions not just what journals have that kind of content
It’s not just about learning a language. Given two equivalent languages, writing a project using one or the other is always going to be less work and less of a maintenance burden than writing it using both. A competent manager will take that into account when deciding what tools to use. On top of that, learning a new language has a cost. Of course Rust and JavaScript are not equivalent, but which one is ‘better’ is highly subjective and dependent on how you measure ‘better’. So a manager needs to take that into account. But my fundamental point is that using two languages for a project adds overhead, and learning a language adds overhead, so unless cost (including time) is irrelevant, there must be a compelling reason to choose a dual-language solution* over a single-language solution, and to chose a solution that requires your devs to learn a new language over one that does not. Not to mention switching platforms has a massive cost if your project is already mature. Even if you’re creating a new project, if your team already knows JavaScript and doesn’t have any particular objection to Electron, there’s no compelling reason.
Sure. Except in my experience interviewing candidates and from what I’ve seen online, there are a lot of developers out there who aren’t very good. I am not optimistic that the average developer will have an easy time learning a new language. If the “we” in “Is this the electron alternative we’ve been waiting for” is you and I, that’s not a problem. But if OP meant to suggest there will be a large-scale shift away from Electron, then the average developer is quite relevant.
*As someone else pointed out, Dioxus is designed with the intent that you’ll right the frontend in Rust, so it’s not exactly dual-language like I thought.