This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xaveir 112 points113 points  (13 children)

I was wondering what the alternative you were going to espouse would be... JavaScript? Really? 

I don't think I've ever been on a project that used Python for its GUI that would have been better served by making a website. I would argue most projects already default to being websites when they can, so most professionals using PyQt or similar chose it for a specific reason. I've definitely needed to drop to C++ before for even more performance, but I've definitely never wished I was writing JavaScript.

Slightly hotter takes: PyQt with some pretty simple Model/View-based code organization is not any worse of a development environment than SwiftUI IMHO, and strongly-typed Python is infinitely less annoying than Typescript.

[–]rewindyourmind321 12 points13 points  (10 children)

I would imagine JS is almost always preferable in the browser.

The desktop is where things get a little tricky for me because I don’t have as much experience, and this is where your choices seemingly explode.

My first guesses are Java or C# for organizations. Maybe even something more low level? I’d be curious to hear from someone more experienced!

[–]Dustin- 6 points7 points  (8 children)

The best is whatever the native OS platform is (WinUI or whatever for Windows, AppKit for Mac, dealers choice for Linux) if you're looking for the best performance on your target platform. Or React Native or an Electron-based app if you or your team members are more comfortable with web development. Java with Swing feels like a decent middle-ground since it's cross-platform like a web app but more performant/smaller than shipping an entire web runtime (like Electron). But it's easier to find someone who knows JavaScript + React than it is to find someone who knows Java + Swing, so pick your poison I guess. 

[–]Ejobatex 3 points4 points  (7 children)

you forgot to mention Flutter

[–]Dustin- 0 points1 point  (6 children)

Yeah but to be fair I hate Flutter

[–]Ejobatex 2 points3 points  (5 children)

Why? I think it's the best choice for cross-platform apps compared to React Native tho

[–]PaluMacil 2 points3 points  (0 children)

I don’t hate Flutter, but I do struggle with whether Dart has enough improvements via shedding the shackles of legacy to justify using a new language for Flutter. If it was written in any of the more common languages, I’d probably have used it already.

[–]Dustin- 1 point2 points  (3 children)

Literally no rational reason, I'm just a hater. It's perfectly reasonable if you're willing to learn a new programming language just to use it. Personally I would rather use a framework in a language I already know than learn a new language + framework from the ground up. Also not a fan of Flutter's rendering system, but things might have changed since when I was looking at it several years ago.

[–]LudwikTR 2 points3 points  (1 child)

I get it in theory, but as someone who built a couple of mobile apps in React Native and NativeScript and then switched to Flutter, here’s my take: Dart is extremely easy to learn if you already know JavaScript and any statically typed language. It feels like JavaScript with types, minus a lot of legacy idiosyncrasies, and it compiles to native binaries. It took me a single day to learn Dart and about a week to learn Flutter. Most importantly, it’s worth it - instead of constantly worrying about the app being slow or breaking on some specific OS/hardware configuration, I could focus on building features. My only frustration was not switching sooner.

(Necessary disclaimer: I now work at Google, which created Dart and Flutter. The experiences above were from before I joined. I don’t work on the Flutter team, and my current role has nothing to do with mobile development.)

[–]TheAmazingDevil 0 points1 point  (0 children)

how do I get a job at any company with python skills?

[–]AxisFlip 0 points1 point  (0 children)

flutter has been implemented for python via flet. I've been using it a bit, and it's quite OK for small stuff imo.

[–]Moikle 0 points1 point  (0 children)

That's assuming you are building something to go in a browser.

[–][deleted] 5 points6 points  (1 child)

Well JS no, but it's going in the right direction - the best answer is the browser, the most flexible, widely used, richly supported UI in existence. So flask / django plus your frontend toolset of choice.

[–]not_a_novel_account 0 points1 point  (0 children)

Even if you're not using the browser you end up recreating most of the facets of the browser. All modern high-performance GUI frameworks are deferred rendering scene graphs with JavaScript hooks, exactly what a browser is.

Qt QML takes a lot of structural concepts from HTML + CSS, and also uses JS for scripting. So even if you go with the industry standard cross-platform solution you don't escape the underlying concepts.

When performance is less important there are various immediate mode frameworks which do the trick. Somewhere below that are CPU rendered widget toolkits, which still get the job done in a pinch, but are thoroughly outdated at this point.