Honest question: As someone who does web development and is looking to learn a new programming language in 2018, would you recommend F# over Elixir (and why)?
This has been previously mentioned but F# gets all of the goodies that come with being a .NET language. Elixir comes from Ruby land and thus has a framework called Phoenix(?) which also has its fans. The big difference is that F# is a statically typed functional language, while Elixir is a dynamically typed functional language. Comparison of static vs dynamic types -> https://hackernoon.com/statically-typed-vs-dynami…
Why you should learn F#
81–90 of 179 posts
Re: Why you should learn F#
#82Earlier quoted context omitted.
Just to be clear, you are arguing the superiority of partial application/currying here right? Because your F# example is the same except it's trading Func , List for (int list -> int list)
Technically its passing 'a list -> 'a list, and only becoming an int array because thats the final input value. The fsharp functions are closer to the C# functions Func , List >
Func where T : IComparable
But maybe all of that is just stronger arguments for F#'s inferred typing...
Re: Why you should learn F#
#83F# is 3 big things to me: Safer threading with immutability Safer programming with null-safety Safer logic with precise domain modeling The precise domain modeling is the real paradigm shift. The whole point of static typing is to inform the compiler about your intent so that it can provide guarantees about correctness. F# makes it easy to define lots of small types that precisely model state so that you can give mor…
I would say it's the same with Rust and Haskell. And I agree, the superior type system of these languages is really a game changer for me and it's very hard to go back to languages missing these features.
There's nothing superior about these type systems, they're simply two of the most static and rigid systems in circulation right now.
Try writing C, Lisp and Forth until it clicks. Then we can sit down and have an informed discussion about missing features.
Re: Why you should learn F#
#84Earlier quoted context omitted.
Technically its passing 'a list -> 'a list, and only becoming an int array because thats the final input value. The fsharp functions are closer to the C# functions Func , List >
Or to be even more pedantic it's Func where T : IComparable But maybe all of that is just stronger arguments for F#'s inferred typing...
Re: Why you should learn F#
#85Earlier quoted context omitted.
Any reason in particular why it's "unacceptable"?
It's slow and bloated. For someone who grew up coding intros and cracking protections in machine code on C=64 and the Amiga, such bloat simply won't fly. It's an abomination. I hate wasting my life away waiting for slow software.
I'm sure you can hand write a piece of C or Common Lisp that is very fast. But I'm sure you would also acknowledge that people that are good at JVM/Dotnet could probably write a pretty fast piece of code in them as well. So at a certain point you have to start weighing other things, like productivity, safety, tooling, libraries, etc.
I find if I really dislike something, I try learning it, and at the end I find that I may not prefer it, but I always learn something from the experience. Think of it as an exercise in sharpening your debate arguments against proponents of these platforms.
Re: Why you should learn F#
#86Re: Why you should learn F#
#87Re: Why you should learn F#
#88Earlier quoted context omitted.
This has been previously mentioned but F# gets all of the goodies that come with being a .NET language. Elixir comes from Ruby land and thus has a framework called Phoenix(?) which also has its fans. The big difference is that F# is a statically typed functional language, while Elixir is a dynamically typed functional language. Comparison of static vs dynamic types -> https://hackernoon.com/statically-typed-vs-dynami…
Did you mean to say Elixir comes from Ruby? Surely you mean Erlang?
Re: Why you should learn F#
#89I heard F# supports this newish thing called dependent typing which allows the type checker to not only check for type correctness but logic correctness as well. I've never worked with dependent typing but is it true? Does the F# really take away the need for all unit testing on a project?
F* has dependent types though.
Re: Why you should learn F#
#90"No matter if you are already a functional developer from a different community (Haskell, Clojure, Scala, etc.) or you are a complete newbie to functional programming (like I was 3 years ago) I think F# can equally impress you" -> "For this task and for the rest of this blog post I'll be comparing F# with C# in order to show some of the benefits." F# is neat, and I see why it's useful if you have a big .NET program a…
As someone said on HN a while ago: F# works better on Linux than OCaml does on Windows. I recently was trying to decide which new language to learn, and reduced the choices to F# and OCaml. The catch? I need something that works on both Windows and Linux. I first attempted OCaml, and gave up soon after starting. I could tell that fighting Windows would be a constant battle. So I went with F#. And then of course, para…