News for hackers. Stuff that matters.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by realharo on Saturday May 16, 2020 @04:00AM (#23201363)
Whether it is actually good is subjective though.

There are tons of existing cross-platform UI frameworks (Qt, wx, libui, JavaFX, TornadoFX, ...). The comment above says "Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework."

And yet people are still wondering why Electron ends up being the technology of choice for so many desktop apps.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by chadcmulligan on Saturday May 16, 2020 @05:39AM (#23201966)
> Electron ends up being the technology of choice for so many desktop apps.

probably because of the large number of JS only developers.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by egeozcan on Saturday May 16, 2020 @06:28AM (#23202258)
JavaScript is a language that's neither abstracted from the basic programming concepts nor its syntax is alien. Most of the people who picked it up can learn many other mainstream programming languages in a week, if not a weekend. Add 1-2 more weeks and they're writing GUI code.

Yet, they don't.

JavaScript is popular for pragmatic reasons (a.k.a. "it delivers results"), so is PHP. They aren't the best languages, but developers who choose them aren't simpletons who can't code in other languages.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by NateEag on Saturday May 16, 2020 @10:09AM (#23203496)
So much this.

I work primarily in JS and PHP.

They are both deeply, deeply flawed (though I have learned to love JS's good parts, while I still hate PHP).

I have programmed in many languages - Java, Python, Scheme, and Bash are all ones I've worked in professionally, and I've spent plenty of time in Emacs Lisp. This doesn't touch on the ones I've tinkered with for fun.

JS and PHP are not the best languages, but they work, they're everywhere, and they're usually what your client already has in place.

Changing languages rarely delivers any actual business or end user value.

So, I work in what the client has.

JS will long outlast PHP, because it's such a massively deployed language and browsers can effectively never remove support for it.

PHP may slowly die out, since it's strictly on the backend, where you can choose your language.

JS is eternal.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by ericlewis on Saturday May 16, 2020 @10:29AM (#23203632)
PHP is absolutely still used on the “front end” Facebook still deploys loads of it in places. SSR is still better using PHP.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by NateEag on Saturday May 16, 2020 @10:48AM (#23203808)
I think of "front end" as meaning "executed in browsers."

How are you using it?

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by nloladze on Saturday May 16, 2020 @10:21PM (#23208943)
I will never ever ever work with PHP again. It's dead.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by pjmlp on Sunday May 17, 2020 @02:52AM (#23210138)
While I hope never to work with it, in what concerns the tiny set of PHP files on my web site, it is alright.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by yoz-y on Saturday May 16, 2020 @05:53AM (#23202048)
I’d say electron became popular thanks to HTML, not JavaScript. IMO HTML is by far the “easiest” to use GUI framework because it is so unconstrained. It will end up a mess, but eventually you can get the result you want. This is not the case with native frameworks which come with a larger sets of rules on how they can be used.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by pjmlp on Sunday May 17, 2020 @02:55AM (#23210153)
I beg to differ, having been doing GUI coding since a couple of decades.

Guess what, what in most of them I never had any issues to center elements, or create fake UI elements out of list items.

Also layout managers were already a thing back in 2000.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by yoz-y on Sunday May 17, 2020 @10:52AM (#23212415)
I did UI development for quite a while too, and in my experience having very specific layouts (and look) in HTML is easier than in frameworks I used (Gtk, Qt, UIKit...).

Main difference is that HTML has affordances to size elements "upwards" whereas in other toolkits you need to do this manually (e.g.: estimating text size is a thing, in html you don't need to care about this)

Now, this also encourages original layouts which are untrue to platforms which is not a good thing imo.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by pjmlp on Sunday May 17, 2020 @05:26PM (#23215627)
You also don't need to estimating text size in QML, XAML, Forms, VCL, and when you need it is hardly any different than dealing with CSS fonts.
Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by realharo on Saturday May 16, 2020 @06:29AM (#23202262)
I very much doubt that is a major reason. Language itself is rarely the issue, unless you're reusing code from other parts of the project (which many projects are, e.g. VS Code with Monaco).

I have spent far too much time on HN recently in related discussions.

Having access to libraries like React and its huge ecosystem is a big plus for productivity (example vs. Qt at https://news.ycombinator.com/item?id=23154315).

Building custom UIs is also very easy with the flexibility that HTML provides (https://news.ycombinator.com/item?id=23164595), even though it can be done with other technologies (and there are some examples of that).

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by mhh__ on Saturday May 16, 2020 @11:28AM (#23204178)
I think people would switch if it had Apple money behind it.

Qt is pretty good but QtQuick can be fairly barren in some areas i.e. if you want a embedded spreadsheet you're out of luck unless you make your own.

Re:Swift 5.3 Will Be Supported on Windows and Additional Lin... by Memosyne on Saturday May 16, 2020 @07:37PM (#23208121)
> Qt is pretty good but QtQuick can be fairly barren in some areas i.e. if you want a embedded spreadsheet you're out of luck unless you make your own.

Hey, have you checked out https://github.com/ec1oud/spreadsheet.qml?