I never said that they didn't.
Java, in its compiled binary format, was portable to every OS that supported it: Linux, Mac, Windows, SunOS, Solaris, AIX. As long as the JRE was installed, you could compile the binary on Windows, move it over to Solaris, and it would work. However, it was a HUGE resource hog, as when you start the JVM for the application, memory and CPU have to be allocated to it, and any memory used inside that allocated memory does not get freed up back to the JVM until garbage collection is run. So it stays allocated and used until the JVM is shut down. However, such allocation and memory/CPU usage can be controlled.
Swift is object oriented, portable as well, integrates with Objective-C, so you're getting into object oriented programming. However, it does not have the downsides of electron:
- It is portable, but limited in scope: iOS, MacOS, WatchOS, tvOS. You can compile on one of those environments, move it to another, and will work.
- Does not have the security or resource contention issues as Electron does.
Again, Swift can be controlled, especially as you'll still be compiling something that is portable.
Electron, is based off of HTML, Cascading Style Sheets (CSS) with HTML, and JavaScript. The security implications are huge:
- Javascript. Enough said. Insert script kiddie issues here.
- it runs off of the Chromium engine, which is known to be prone to cross site scripting attacks.
- Because of Chromium, Electron are simply web-based applications. It requires that engine to exist, meaning you have to have Chromium installed or used.
- Because of #3, every Electron app comes with its own version of Chromium. Chromium on its own is 20 million lines of code. The Linux kernel is 27.8 million lines of code on its own. Chromium is nearly the size of Linux, and just for an engine.
- because of #4, you get the resource hog. Each electron app spawns its own version of Chromium, then it has to start the application you're wanting to start. So even something like an app printing "hello World" takes up a good 100MB of space, let alone the memory. Now, look at 1Password, and all of the functionality it needs.
If I were to rank them in order of usage, I'd go with Swift at #1, Java at #25, and Electron at #4,827,955,004,271. Yes, I know there aren't that many programming languages in the world; I'd make some of them up, let alone call up some that haven't seen the light of day since they were first used. Hell, I'd use Logo before Electron, because Turtle Graphics.
en.wikipedia.org
BL.