News for hackers. Stuff that matters.
Re:The myth of using Scala as a better Java by kuschku on Thursday March 02, 2017 @05:01AM (#13772933)
> Everyone opts for electron

And I’m just sitting here, using https://github.com/ReactiveX/RxJavaFX

Re:The myth of using Scala as a better Java by pas on Thursday March 02, 2017 @07:47AM (#13773625)
Is JavaFX okay? Or maybe even good? What's wrong with it? (Not polished enough, not maintained enough? Not updated fast enough?) RxJava seems pretty okay.
Re:The myth of using Scala as a better Java by _pmf_ on Thursday March 02, 2017 @10:19AM (#13774587)
Off the top of my head: misses some UI elements / widget types (spinner / numeric entry). UI bindings require a lot of manual converters instead of doing conversions that p.e. WPF does out-of-the-box (like double to string when using a text box; principle of least surprise).

And (the worst) it's not conceptually compatible to the model classes (abstract tree model) that almost every UI framework (including Swing) provides. Instead, tree nodes have to be manually instantiated).

Re:The myth of using Scala as a better Java by kuschku on Thursday March 02, 2017 @10:56AM (#13774968)
> misses spinner

https://docs.oracle.com/javase/8/javafx/api/javafx/scene/con...

> UI bindings require a lot of manual converters instead of doing conversions that p.e. WPF does out-of-the-box (like double to string when using a text box; principle of least surprise).

You can use String.valueOf, but usually don’t want to do that. And how do you want to represent the float? With Scientific notation, Engineering notation, or purely decimal? This is not simple.

> And (the worst) it's not conceptually compatible to the model classes (abstract tree model) that almost every UI framework (including Swing) provides. Instead, tree nodes have to be manually instantiated).

Or you use the FXML bindings for creating them from XML?

Re:The myth of using Scala as a better Java by TeMPOraL on Thursday March 02, 2017 @08:14AM (#13773759)
Seems perfectly fine for building desktop applications in Java (which is what I've been doing for the last 1.5 year at my $dayjob).
Re:The myth of using Scala as a better Java by srssays on Thursday March 02, 2017 @08:55AM (#13773975)
Java has problems on OS X and Linux. It is not truly cross-platform like Electron is.
Re:The myth of using Scala as a better Java by TeMPOraL on Thursday March 02, 2017 @09:01AM (#13774011)
Don't know about the OS X problems much, but on Linux it's workable with FX (our product is actually used on both Windows and Linux). OTOH, Electron achieves its portability by shipping the whole Chromium browser with your application...
Re:The myth of using Scala as a better Java by kuschku on Thursday March 02, 2017 @10:57AM (#13774992)
There is actually one issue JavaFX has on Linux: It uses Gtk to determine renderscale, so it can’t handle HiDPI at all (Gtk only scales in integer amounts, so everything is either 96dpi or 192dpi)
Re:The myth of using Scala as a better Java by FreezerburnV on Thursday March 02, 2017 @09:31AM (#13774178)
Could you talk a little bit about these problems? I was not aware of any serious issues on non-Windows platform, and would like to hear about them. As Java/Kotlin is generally my go-to language for making things in my off time, that would be helpful to know about.