News for hackers. Stuff that matters.
Re:What's New in F# 4.1? [video] by fromscala11 on Friday December 09, 2016 @04:16PM (#13141928)
We need HKT. F#. Cmon... I love F# but seriosly...
Re:What's New in F# 4.1? [video] by Rickasaurus on Friday December 09, 2016 @04:34PM (#13142040)
We're working on Type Classes. It seems like HKTs (or anything like them) are going to be hard without diverging in a huge way from the rest of the .NET ecosystem.
Re:What's New in F# 4.1? [video] by jhomedall on Friday December 09, 2016 @06:27PM (#13142797)
That's fantastic news! I currently use Scala for most of my personal development, but having type classes would make F# attractive enough for me to switch over. I much prefer the cleaner syntax of F#.

Losing HKT would be a shame, but that's a trade-off I would be willing to make.

Re:What's New in F# 4.1? [video] by willtim on Saturday December 10, 2016 @03:58AM (#13144784)
Scala has never properly supported HKTs though. When I last tried it, there were multiple open issues, e.g. the partial application of type parameters. So I really don't buy the argument that Scala scores a point over F# due to HKTs. If you want HKTs, use Haskell.
Re:What's New in F# 4.1? [video] by daxfohl on Saturday December 17, 2016 @01:58PM (#13201882)
It scores at least 0.7 points though. That said, it loses points elsewhere (as do all languages).
Re:What's New in F# 4.1? [video] by daxfohl on Friday December 09, 2016 @07:58PM (#13143295)
I'm curious, will Type Classes enable http://www.sparxeng.com/blog/software/an-example-of-what-hig... without needing HKT?
Re:What's New in F# 4.1? [video] by KirinDave on Friday December 09, 2016 @06:01PM (#13142636)
I really think Type Classes will address 90% of what people want without requiring deep hackery. The solutions we have with class dispatch right now are workable but awkward.
Re:What's New in F# 4.1? [video] by phillipcarter on Friday December 09, 2016 @07:55PM (#13143284)
Awkward person who was in the video here

The issue you're looking for (since an ask for HKTs typically means that Typeclasses are the ideal feature) is here: https://github.com/fsharp/fslang-suggestions/issues/243

Please leave opinions, commentary, and vote if this is something you want! F# language design is done completely in the open, including motivation for features. Thanks!

Re:What's New in F# 4.1? [video] by tpetricek on Friday December 09, 2016 @04:57PM (#13142204)
Not only we do not need HKT, we also do not need Profunctor Optics.
Re:What's New in F# 4.1? [video] by KirinDave on Friday December 09, 2016 @06:11PM (#13142683)
F# and its spirit animal OCaml are really great precisely because of this attitude.

They're really good at saying "No" to things that offer at best incremental improvements at the cost of significant complexity.

"Profunctor Optics" is a great example. Cool paper, but no thanks.

Re:What's New in F# 4.1? [video] by runT1ME on Friday December 09, 2016 @07:13PM (#13143049)
Higher kinded types reduce complexity in the same way generics reduce code complexity. If you think one makes things simpler but not the other, I would assume you're not familiar with it?

Do you have examples of why it would add significant complexity? I use them constantly and it really simplifies my code a lot!

Also, I don't believe 'profunctor optics' is a paper, I think it's just one (interesting) implementation of optics, which are useful in any language that encourages immutability.

Re:What's New in F# 4.1? [video] by KirinDave on Saturday December 10, 2016 @12:21PM (#13146671)
The complexity that HKT brings to F# is not just conceptual. It needs to exist in the CLR which will bring implementation tradeoffs.

"Cool paper but no thanks" is a saying for when people come to you with an extremely new technique and want you to incorporate it at the language level with very little proofing in the field.

"Profunctor optics" is the a description of how profunctors encode lenses and similar structures. I am aware. I also think that technique can cook in Haskell land for a few more years before non-research projects should uptake it.

Re:What's New in F# 4.1? [video] by runT1ME on Tuesday December 13, 2016 @01:31PM (#13169237)
Thanks for replying, yeah I suppose I didn't think about the ramifications of having to deal with reified generics and higher kinded types. I still think they're an amazing productivity boost, and the initial 'weirdness' of learning that particular abstraction pays off a tremendous amount in code readability.

As for the 'cool paper' comment, I wasn't aware of this new jargon, thanks for informing heh. I'm not sure how well it will play outside of haskell, I've done a Scala encoding of them and it's a bit more awkward than other representations.

Re:What's New in F# 4.1? [video] by willtim on Saturday December 10, 2016 @03:50AM (#13144763)
Many people use the exact same argument to dismiss the entire functional programming field.
Re:What's New in F# 4.1? [video] by KirinDave on Saturday December 10, 2016 @10:48AM (#13146140)
I'm sorry, but implicit slippery slope arguments are not a means by which one can force every functional language to run the project the way Haskell does.

But it's also worth noting that this is not a rejection of the entire concept of lenses, just that right now Haskell's implementations leave a lot to be desired (e.g., abandon all error sanity, ye who enter here).

Haskell is as much a research platform as a programming language, and as such it has the leisure to experiment this way. Everyone else will wait awhile for things to bake. Look what happened when Haskell built its entire stdlib on monad transformers and then we all realized they're awful compared to the alternatives.

Re:What's New in F# 4.1? [video] by willtim on Sunday December 11, 2016 @04:11AM (#13150276)
I mostly agree with this. But nobody is "forcing" anything, one can still use Haskell and avoid the e.g. infamous (and non-idiomatic) lens library. But just as you haven't given up on lenses, I also don't agree with the wholesale rejection of ideas based on imperfect implementations, which is what prompted my comment.
Re:What's New in F# 4.1? [video] by phillipcarter on Friday December 09, 2016 @07:58PM (#13143298)
Hey tomas!

This is why I love working on an open project like F#. We get to disagree in public! I would actually like Typeclasses, though I have serious reservations in terms of not breaking back compatibility. I'm certainly not about to get on a table and rant about how "it was truly the lack of better ad-hoc polymorphism via higher-kinded types that kept me from writing good software in F#!", and I see a danger in bifurcating the language .... but I like Typeclasses and think they do solve some more nuanced issues out there.

I should probably be putting my opinions on the Typeclasses thread...

Re:What's New in F# 4.1? [video] by daxfohl on Friday December 09, 2016 @11:04PM (#13143957)
Re:What's New in F# 4.1? [video] by tome on Tuesday December 13, 2016 @01:59PM (#13169596)
I would love to know how you live without HKT. Modules, perhaps?
Re:What's New in F# 4.1? [video] by KurtMueller on Friday December 09, 2016 @04:25PM (#13141989)
What's hkt?
Re:What's New in F# 4.1? [video] by thijsvandien on Friday December 09, 2016 @04:30PM (#13142012)
Higher-Kinded Types

"With higher-kinded types [...] type operators can be parameterized by other type operators. Java doesn’t support higher-kinded types, but, if it did, you would be able to write something like this:"

  class GraphSearch<T> {
    T<Node> frontier;
  }
Source: https://www.stephanboyer.com/post/115/higher-rank-and-higher...
Re:What's New in F# 4.1? [video] by TIHan on Friday December 09, 2016 @04:20PM (#13141954)
Do we really need them?
Re:What's New in F# 4.1? [video] by justneedvodka on Friday December 09, 2016 @04:36PM (#13142054)
No. There's a difference between needs and wants.
Re:What's New in F# 4.1? [video] by seanparsons on Friday December 09, 2016 @05:38PM (#13142484)
Well if you don't think a modern FP language needs higher kinded types you probably do need vodka.