> Although Scala was never really designed for functional programming, a carefully chosen subset of the language has proven adept at real-world functional programming. http://degoes.net/articles/scalaz8-is-the-future
i thought scala was designed to be a functional language on the jvm
AFAIK it is a "one to rule them all - finally" language. Except logic programming maybe.
oh ok. i thought it was trying to be haskell on the jvm
(never used it)
@dpsutton if you want that take a look at Eta or Frege
i've got my language on the jvm 🙂 just what I understood to be its motivations
the Scala problem is that it can be anything to anyone, so among teams you will have to decide on a certain style and have thorough code reviews to prevent things to become a mess
The motivation was to have a better Java. Martin Odersky left Sun to implement the stuff he thought java needed.
He was the guy that implemented generics in java, for instance.
generics in C# were first implemented in F# I believe. Language nerds who are ahead of the game
And then there are the language nerds that say: "our freshmen all come from university and we have a lot of them, so lets not put them through learning to use generics".
do you mean a lot of juniors don’t know how to use them?
No, That was the reason why go does not have generics. Because they wanted a language thats easy to use.
you can also use dynamic typing for that 😛
I think Scala also supports higher kinded types, where Java only supports one level of generics? Could be wrong
I am not an MS fan, but the F# I've read looks nice 🙂
Yeah, I never really understood why it didn’t take off
Lack of functors/polymorphic variants and presence of null comes to mind
Having access to the clr ecosystem is nice tho
Lack of functors is due to the lack of HKT in F#?
are we talking about ML-style functors?
I thought he meant Haskell-like functors
as in structure that can be mapped over
Yes I meant ml functors
Dunno why they didnt take that from ocaml too
I’d have to assume that the .NET internals made it prohibitively difficult for some reason
F#'s adoption problem seemed to me to be partially an extended dearth of good tooling, and partially a lack of a 'killer use case'; they tout their type providers, but have a very difficult time selling their use cases.
OCaml on the other hand has a tiny ecosystem and very slow language evolution (with some quite important shortcomings)
Beautiful language otherwise
Tooling is also a mess, or at least used to be
how good is F# tooling off windows and for how long? seems like another concern
I used to know some very enthusiastic f# people here, it seems they all moved on to other things these past few years
Like elixir for instance (personally not a fan of it)
moved on from F# or from clojure?
I take as "from F#"
as in, they didn't stick to the language
F# has a bizarre restrictions as well.
It always seemed to have weird restrictions from OCaml, but without a rationale for why they existed
@dpsutton I think C# killed F#, the tooling was way better, and each new release brought more and more functional features into C#.
@tbaldridge Can you name a few examples? I only dabbled with F# as a hobbyist
C# 7 has destructuring, Python style tuples, pattern matching,
C#'s version of Clojure's defrecord
is also in the works.
as in case classes like in Scala ?
Yeah, something like this:
class Point(int X, int Y);
var v = Point With(X = 42, Y = 33)
They default to having public immutable members
(syntax is probably wrong)
yeah, that’s the same as in Scala
they also have default equality, etc.
exactly
And since this is .NET they're also value types and IIRC are passed around on the stack 😄
C# has a history of cannibalizing MS' other research projects - not necessarily a bad thing, but the research doesn't always end up seeing the light of day intact, either.
ah ok, that’s different from Scala then, although Scala has value classes but those can only wrap a primitive I believe
We had reimplement those immutable records for some state that got passed around a bunch. Would have loved that
it’s the most pleasant feature of Scala imho