Hacker News new | ask | show | jobs
by barelyusable 1964 days ago
It's a little sad that after 50 years since Microsoft and Apple were started, there still is no easy way to write a natively looking cross-platform GUI app, even with a language like Golang.

Recently I looked at couple of options of writing some Golang to make a simple GUI app that would look natively on Windows/MacOS (text area, several checkboxes/buttons), and there's no much there to be honest.

5 comments

Sure there is: Write a separate UI for each platform.

Seriously, this is the only option if you care not just about looks but also about feel, because no cross-platform toolkit gets things like keyboard shortcuts, scrolling inertia, menu mnemonics, etc. correct on all platforms they target. Not to mention platform accessibility features.

Surely most of the work in your app is platform-independent, right? Plumbing data into platform-specific UIs should not be a hard endeavor.

Fortunately you can go four levels of virtualization in and do it pretty easily

Users won’t care, there’s no award

Unironically, your best option is GTK. I've found that it generates consistent looking UIs for Linux and Windows (my main build targets) without totally ruling out MacOS
Sure there is, my C++ code has worked just fine all these years.
I think Microsoft wants to address that in .net 6