top | item 46987108

(no title)

arcadia_leak | 18 days ago

One good case for it that I see is a viable basis for cross-platform desktop apps. Today, cross-platform desktop GUI apps are either just a snapshot of the website contained inside Electron, or a C/C++ code base with manual memory management. D can serve as a nice middle ground in that space.

discuss

order

jpc0|18 days ago

Where is the extensive tooling support for this use case if that is where you think it fits?

Apple is all in on Swift, so you will not be writing native MacOS or iOS code for UI in D, best case you put your business logic in D but you can do that in any language which has bindings to swift/Obj-C.

Android is all in on Kotlin/Java, not D again

Microsoft is all in on C#, again not D.

Linux your two best options for UI is GTK and Qt, C and C++ respectively.

So the only place where you could bave seemless integration is Linux through FFI.

Here's the thing though, for building a core layer that you can wrap a UI around, Rust has insanely good ergonomics, with very good third-party libraries to automatically generate safe bindings to a decent amount of languages, at least all those listed above and WASM for web.

None of those uses cases are painless in D.

arcadia_leak|18 days ago

It's true that there is no off the shelf tool that you can use right now to write your app, but it certainly doesn't prove that making such a tool is impossible or even complicated.

It makes sense for a complex productivity app (e.g. an office suite editor) to implement the UI from scratch anyway, and for that they may choose D. If Jane Street didn't pick OCaml, it would've died long ago -- in the same manner, some company might pick D to do UI or anything else really.

999900000999|18 days ago

Flutter does cross platform + web and is as close to native as you'll get without writing code directly in Swift, C#, etc.

You're free to start a company and solve a real business problem.

If I became a D expert tomorrow it's not going to make me more money. It's not getting me a better job.

arcadia_leak|18 days ago

Why yes, D is not the best choice if you're looking for instant profit.

p0nce|17 days ago

Exactly what some of us are doing with D.