4 ms·
> have all the functions described in it turned into reasonably safe FFIed function calls Many langs get close with the ease of importing C headers (Go, Rust,
by kodablah 5y ago
> have all the functions described in it turned into reasonably safe FFIed function calls
Many langs get close with the ease of importing C headers (Go, Rust, etc), but once you ask for reasonably safe FFI'd calls, you're asking a bit too much since ownership goes out the window. Otherwise, if you mean turned into acceptably-unsafe FFI'd function calls, agree just about every lang with C interfacing built in should have that.
> It’s fascinating to me that people find it easier to write a pile of React and HTML on top of electron rather than dragging and dropping native widgets for a framework like we did in the old days.
Ok, on my mark, you write a reasonably complex native GUI for the 5 common platforms (and including the wiring, not just drag-drop) and I'll write a reasonably complex GUI w/ web tech. Once you see the difference in time to market, not to mention reduced maintenance cost, it'll be less fascinating.
Other than those points, I somewhat agree w/ the others, or rather don't strongly disagree (the condescending tone notwithstanding).
- madhadron 5y ago> Ok, on my mark, you write a reasonably complex native GUI for the 5 common platforms (and including the wiring, not just drag-drop) and I'll write a reasonably complex GUI w/ web tech. Two things on this: this was Java's promise (and Swing delivered on it for the desktop). And the expectations of a web app/electron app are still lower than those of a native app.
- jay_kyburz 5y ago>Ok, on my mark, you write a reasonably complex native GUI for the 5 common platforms oh, it has to run in a browser too so that users don't need to "install" it.
- nixpulvis 5y agoCan Qt help with this? I'm unaware of it's WASM support, but it seems like just a matter of time before they have all the GUI elements.
- nixpulvis 5y ago> Ok, on my mark, you write a reasonably complex native GUI for the 5 common platforms (and including the wiring, not just drag-drop) and I'll write a reasonably complex GUI w/ web tech. I think you've missed the point of the title.
- sudosysgen 5y agoMany Electron apps are native on mobile. So we really mean on all 3 desktop platforms. The answer is obviously Qt or Java. It works.
- kodablah 5y agoAnd many Electron apps are not native on mobile, just use a web view, and share many resources with their Electron cousins. Same with the web apps. As someone who has written multiple Qt and Java GUI apps, it always seems fine at first until your UI needs become more unique (and you're subclassing QWidget/JComponent) and you have to jump through hoops to get something a web view has (e.g. streaming video). I don't like the lack of native any more than the next guy, but I can understand sacrificing native benefits for cohesion/features. If you can tolerate a middleground of non-native but no-browser-bloat, Flutter or .Net Maui may mature enough to help for the complex uses.
- sudosysgen 5y agoLet's be honest, if you're making a webview for the mobile app it's going to be pretty different from the desktop Electron version. You're going to share many resources, yes, but there's going to be a lot of divergence. Sure, writing your own UI components sucks, but it's not that much worse than writing a UI component for Electron. If you need to stream something from the web, QMediaPlayer works fairly well from my experience. Also personally I consider Flutter to be native.
- l33t2328 5y agoI’ve never heard of C function “ownership”. What does it mean?
- pjc50 5y agoPointers passed in and out have a very important property that's critical for writing secure reliable programs but is not encoded anywhere in the language, and that is lifetime and ownership. If you pass a pointer to a function, will it free() it? Or store it somewhere where it will later free it? Can you now free it yourself safely or not? Same applies to returned pointer values: don't free or must free?
- deleted 5y ago[deleted]