News for hackers. Stuff that matters.
Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @08:46AM (#16884292)
F# only has access to a subset of .NET deployment scenarios, where Scala can be used pretty much everywhere there is a JVM.

So most companies actually are more keen to bet on Scala than F#.

OCaml/Reason world lacks the wealth of Java libraries, which are an import away on Scala.

Regarding Kotlin, so far its killer use case is targeting Android, where one is stuck with an ageing Java subset. Outside of Android, it remains to be seen how it will keep up with the Java improvements coming up every 6 months now.

Re:Towards Scala 3 by Bizarro on Friday April 20, 2018 @09:02AM (#16884377)
I don't think many companies are betting on Scala anymore. F# is just as irrelevant in the grand scheme of things.

Let's face it, Kotlin hurts Scala adoption.

Re:Towards Scala 3 by stusmall on Friday April 20, 2018 @11:59AM (#16885873)
Kotlin and Java 8. I started using Scala in Java 7 era and loved it. When Java was stagnating it seemed like an alternate language that targeted the JVM was the best option. Progress with the language has really picked up a lot. There is a lot that Scala has that Java doesn't, but now its not enough to make it worth it. Java is so much easier to work with on a large team.
Re:Towards Scala 3 by eweise on Friday April 20, 2018 @03:38PM (#16887864)
The two languages though also have preferred libraries / frameworks. I code in Java again and the main thing that bugs me is being always in the Spring ecosystem. There is a mindset in javaland that every technology needs to be wrapped by Spring. Scala gave me the freedom to choose alternative libraries.
Re:Towards Scala 3 by stusmall on Friday April 20, 2018 @03:44PM (#16887926)
Oft. I agree with you there. I never enjoyed spring. I don't get the appeal. With scala I loved play framework. I know it has java support but I never tried it. It used so many scala idioms and features I'm not sure how well it would translate.
Re:Towards Scala 3 by pjmlp on Saturday April 21, 2018 @03:03AM (#16890327)
Depends where you work.

I know Java since the early days and only used Spring during one month as validation of an architecture proposal.

Re:Towards Scala 3 by simon_o on Friday April 20, 2018 @09:41AM (#16884658)
It seems like it. I recently took the liberty to update the language rankings on https://en.wikipedia.org/wiki/Scala_(programming_language)#L... and compared to 2016, Scala took a hit on pretty much every ranking.

Outlook largely negative, falling in rankings across the board.

Re:Towards Scala 3 by snuxoll on Friday April 20, 2018 @11:00AM (#16885303)
Kotlin has many benefits that Scala has in terms of “being a better Java” without sacrificing the readability and usability benefits of Java itself.

Scala is a fantastic language, but it’s not one your average Java developer can pick up in a day or two.

Re:Towards Scala 3 by ionforce on Friday April 20, 2018 @05:32PM (#16888595)
What readability and usability benefits are you claiming Java to have?
Re:Towards Scala 3 by snuxoll on Saturday April 21, 2018 @01:15AM (#16890097)
Java is a simple language, the syntax is easy to parse and logic is generally straightforward to reason about - as a programmer you have very little ability break expectations of how the language itself behaves (no operator overloading, etc).

Scala, on the other hand, gives you a huge toolbox down to some really complicated to reason about features like implicit parameters, creation of completely arbitrary operators, etc.

[Insert some funny pun here about Java giving you a simple tool while Scala gives you an incredibly complicated one]. They're both great languages, but they serve very different purposes and audiences - Kotlin happens to fit Java's demographic better than Scala as a result, it doesn't have the magic and complexity to the same degree Scala does (the most confusing new constructs probably revolve around builders/lambda's with receiver types which aren't needed by most developers not writing DSL's).

Re:Towards Scala 3 by dominotw on Saturday April 21, 2018 @09:40AM (#16891383)
i am almost never surprised when I am reading java code. Its almost never about the code.

With scala I seem to have wtf moments about the language every once in a while. (eg: magnet pattern)

Re:Towards Scala 3 by saosebastiao on Friday April 20, 2018 @11:35AM (#16885633)
That assumes that Java is the only funnel for Scala. Sure, Kotlin likely now captures more of the people trying to get out of Java, but how many people does it capture with backgrounds in Haskell, OCaml, Lisp, R, Python/Pandas, or any other language for that matter?
Re:Towards Scala 3 by twic on Friday April 20, 2018 @12:48PM (#16886376)
Aren't there so few people with backgrounds like that (Python aside) that it doesn't really matter?
Re:Towards Scala 3 by saosebastiao on Friday April 20, 2018 @01:31PM (#16886726)
No? I came to Scala from R and Clojure. The point is that Kotlin has pigeonholed itself into being a language for people who can't stand Java. Scala is partially that, but it is also vying for the attention of anybody who does object oriented programming, anybody who does functional programming, anybody that cares about type safety, etc.

The idea that Kotlin is hurting Scala adoption rests on the assumption that the only people who would ever adopt Scala are the people who are trying to get rid of Java.

Re:Towards Scala 3 by stephen123 on Friday April 20, 2018 @08:52AM (#16884323)
Not only on JVM, scala can be used in the browser with scala.js or without a JVM with scala native.
Re:Towards Scala 3 by GiorgioG on Friday April 20, 2018 @09:14AM (#16884455)
Yep - you're right... F# definitely can't be used in the browser: http://fable.io/
Re:Towards Scala 3 by zrg on Friday April 20, 2018 @08:53AM (#16884328)
F# is now supported within the .NET core world so it opens up the deployment scenarios beyond anywhere traditional .NET would live.
Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @09:10AM (#16884435)
Not everyone is getting into .NET Core.

In fact, Microsoft has to advocate library writers to actually care about .NET Core and .NET Standard.

https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/NET-St...

Re:Towards Scala 3 by nightski on Friday April 20, 2018 @10:10AM (#16884881)
How is this relevant to the discussion though? F# works on either .NET Core or the regular .NET Framework.
Re:Towards Scala 3 by snuxoll on Friday April 20, 2018 @10:42AM (#16885143)
Eh, it mostly works on .Net Core. There's still some bugs with the compiler around Generative Type Providers when running the compiler on the .Net Core runtime, forcing you to compile with a build of fsc running on mono or the full .Net Framework.

Still, for all intents and purposes you are correct - but there's still some growing pains in the tooling that are hard to ignore.

Re:Towards Scala 3 by snuxoll on Friday April 20, 2018 @10:40AM (#16885125)
Meh, the reason many people weren't targeting .Net Core until recently was because of the huge pain in the ass it involved. .Net Standard 1.0/1.1 were missing a LOT of API surface area that many libraries needed. .Net Standard 2.0 fixes this, and makes life easier for library authors who already support multiple runtimes in the process by providing a sane upgrade path from the hell that is PCL's. It's all about tooling, there's no reason for library authors to not target .Net Standard in their projects now unless they really need some Windows/Full-specific assembly that isn't included.
Re:Towards Scala 3 by naasking on Friday April 20, 2018 @02:04PM (#16887037)
> Meh, the reason many people weren't targeting .Net Core until recently was because of the huge pain in the ass it involved

+1000. It wasn't even library support, it was the tooling that was a huge pain in the ass. Half the time it didn't work right, builds broke unexpectedly, build file formats kept changing, cripes what a pain. I swore off it until the early .NET 2.0 standard prereleases when things seemed more stable, and it's been much easier to port my libraries.

Re:Towards Scala 3 by GiorgioG on Friday April 20, 2018 @09:17AM (#16884471)
I've been using .NET Core since it was released. Sure in the beginning library support was spotty at best, but that was quite a while ago. I have yet to find a popular library that doesn't support .NET Core/Standard.
Re:Towards Scala 3 by Philipp__ on Friday April 20, 2018 @09:39AM (#16884641)
And Clojure? I find it to be the best experience on JVM.
Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @10:08AM (#16884868)
My favorite Lisp variant.

I have not listed it, because in spite of spec, it still is a dynamic language.

Re:Towards Scala 3 by GiorgioG on Friday April 20, 2018 @08:53AM (#16884324)
> F# only has access to a subset of .NET deployment scenarios

And what subset would that be? The only place you can't use F# IIRC is UWP application which is likely not the deciding factor in choosing F# or Scala.

Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @09:06AM (#16884401)
Anything GUI related, and their respective tooling support on Visual Studio, which it never got.

It is still playing catch up with VS 2017 tooling for VB.NET and C#.

Re:Towards Scala 3 by enricosada on Friday April 20, 2018 @09:47AM (#16884702)
About GUI on .NET Framework:

- Windows form works but not perfect. The editor works if you install the template for it, but not the auto generation of code, like double click on button -> handler generated. You write code programmatically. but is used a lot. I use it in the repl (fsi), to generate chart, custom data visualization.

- WPF the same, works, no editor (but codegen is less needed)

- Xamarin support F# ( https://docs.microsoft.com/en-us/xamarin/cross-platform/plat... ) on Forms, etc

Some good from community+MS, because community tried to adapt techonologies and make it more friendly to use in F#

- Xamarin XAML in Elmish style, really more idiomatic ( https://github.com/fsprojects/Elmish.XamarinForms ) from F# creator itself (Don Syme, who now work on xamarin division too)

- WPF and Xamarin xaml can be used with a type provider too for statically type view at compile type ( http://fsprojects.github.io/FsXaml/ )

The only one not yet supported is UWP, because of of .NET Native.

All that without speaking of the gui stack outside .net framework, like electron+fable or just fable+elmish/react/react.native ( https://github.com/SAFE-Stack/SAFE-Nightwatch )

Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @10:13AM (#16884907)
GUI development without designer support is just like time traveling to implementing Turbo Vision and Clipper applications on MS-DOS.

Never understood the mentality for designing UIs by coding instead of visually.

I care for what comes in the box, and is directly supported by Visual Studio and Blend.

If someone needs to lose their .NET GUI tooling productivity to embrace F#, then better wait while C# keeps getting F# most relevant features.

Even C++ has better UI tooling support on Visual Studio than F#.

Re:Towards Scala 3 by enricosada on Friday April 20, 2018 @10:44AM (#16885158)
Depends for what you need GUI. You need it for complex LOB app? So no, editor will be good.

Personally, i write c# and xaml, and i dont use the editor (vs or blend), but i edit directly the xaml.

About f# and gui, depends on use case. For example https://fslab.org/XPlot/ to show graphs.

  let series = [ "bars"; "bars"; "bars"; "lines" ]
  let inputs = [ Bolivia; Ecuador; Madagascar; Average ]
  
  inputs
  |> Chart.Combo
  |> Chart.WithOptions 
       (Options(title = "Coffee Production", series = 
          [| for typ in series -> Series(typ) |]))
  |> Chart.WithLabels 
       ["Bolivia"; "Ecuador"; "Madagascar"; "Average"]
  |> Chart.WithLegend true
  |> Chart.WithSize (600, 250)

this is used to generate programmatically i chart. inside a window with some layout, usually in enough. And i can do testing in the repl.

But yes, if you use editor like c# version, F# is less nice to use. But again, programmatically allow other things, like https://github.com/fsprojects/Elmish.XamarinForms

So depends how much time you edit the view (and why), vs gains in the logic behind the view. For me the global tradeoff, but depends, so you are right.

Re:Towards Scala 3 by snuxoll on Friday April 20, 2018 @10:50AM (#16885208)
The only time I have ever felt compelled to design a UI visually is when working with iOS or macOS because the framework is so centered around Interface Builder. When I write a WPF or JavaFX view I am not using Blend/Scene Builder to drag and drop controls, but to have a mostly-accurate preview of what crap looks like without having to build and run.
Re:Towards Scala 3 by jupp0r on Friday April 20, 2018 @10:42AM (#16885138)
Ever heard of the web?
Re:Towards Scala 3 by pjmlp on Friday April 20, 2018 @03:43PM (#16887914)
Yes, it keeps trying to reach parity with native UI design tooling both on desktop and mobile OS.
Re:Towards Scala 3 by GiorgioG on Friday April 20, 2018 @09:21AM (#16884502)
If you're waiting for feature parity with C# in VS, you'll never get it. There are millions of C# developers and F# devs are counted in the tens of thousands (sadly) so there's a reason for that.

I don't believe most organizations considering adopting F# or Scala are considering them for GUI development so I'm not sure why you'd rule out F# because of that

Re:Towards Scala 3 by jrq on Friday April 20, 2018 @10:56AM (#16885263)
This is kinda true, but not in the sense that you mean it.

And maybe not across the board, but my clients are very comfortable with the (very few) F# solutions we've done. Ocaml clients generally use it for stability, or correctness, they certainly aren't competing in the same sphere that kotlin, scala, Java really operate in. Prominent in the financial spade especially, but the trend is the same everywhere.

Reason may eventually help ocaml move closer into those spaces, as people are coming to ML with more openness and are more eager to learn and get involved, so that'll be cool to see in the future.

Anyways, don't count F# out either. I'm no expert, only ever used it with other project leads and with smaller clients, but MS is doing impressive work lately, like NET Core and stuff like that. They at least can show that making net more visible and flexible is part of what they're after.

Java won't be killed. Ever. But people may stop writing it eventually.

Re:Towards Scala 3 by romanovcode on Friday April 20, 2018 @09:19AM (#16884482)
> F# only has access to a subset of .NET deployment scenarios, where Scala can be used pretty much everywhere there is a JVM.

This statement is wrong. F# can use .NET Core, and it works same as JVM.