News for hackers. Stuff that matters.
Re:Ask HN: Why isn't F# more popular? by pritambarhate on Wednesday May 31, 2017 @07:58AM (#14451772)
Most of the programmers do programming for a living. They are not passionate programmers who like to learn new languages. They care about getting things done. Since Java, C#, Python, JavaScript, Ruby and Rails, PHP are all popular and have huge library ecosystem around them, for most of the 9 to 5 programmers, there is little incentive learn any functional language.

Also since all popular and dominant languages are either Object Oriented and/or Imperative, functional programming concepts seem too alien.

Even though I consider myself a fairly passionate programmer, I haven't found enough incentive to invest proper time to learn a purely functional language. The infatuation with Clojure and Haskell only lasted for a weekend for me. I always think, that next month I am going to invest in learning a functional language, but always something else more shiny comes along from other domain like, Dynamo DB, Firebase, RabbitMQ, etc. Which I find more practical to learn rather than learning yet another programming language.

Re:Ask HN: Why isn't F# more popular? by willvarfar on Wednesday May 31, 2017 @08:17AM (#14451854)
There are also lots of passionate hobby programmers who are passionate about results rather than the journey.

I mean, I know a ton of obscure and esoteric languages. Do I turn to them, even the cool ones, when I want to implement some idea I have? I'm afraid I often turn to the tried and tested boring languages because of the network effect. Increasingly I just use raw javascript, which is right up there with VB and PHP for unpopularity, just because it makes it damn easy to share the result with others if its in a web-page.

Re:Ask HN: Why isn't F# more popular? by douche on Wednesday May 31, 2017 @10:33PM (#14457544)
Exactly. I have been infatuated with F# for over a year, but it is very hard to abandon C# for my work projects. At least, it's a way of jacking the bus factor to one, which makes me nervous
Re:Ask HN: Why isn't F# more popular? by m_fayer on Wednesday May 31, 2017 @08:19AM (#14451864)
Agreed. At some point, if your language(s) of choice are decently powerful and you are decently good at them, you don't feel yourself shackled by a lack of agility, expressivity, or capacity for producing something of quality. Rather, you feel fluent. I mean, I feel a little uncool having never more than dabbled in functional-first languages. But I'm also an adult who has shipped multiple products without any undue tooth-pulling and rather enjoyed the process. So it's hard to take my feeling of uncoolness all that seriously.

And then the motivation to pick up not only a new language but a whole new paradigm just doesn't seem that urgent or appealing, especially when compared to that new bit of infrastructure which will oh-so-obviously add a significant new tool to your toolbelt.

Re:Ask HN: Why isn't F# more popular? by narimiran on Wednesday May 31, 2017 @08:54AM (#14452074)
> At some point, if your language(s) of choice are decently powerful and you are decently good at them, you don't feel yourself shackled by a lack of agility, expressivity, or capacity for producing something of quality. Rather, you feel fluent.

I consider myself fluent in Python.

But in my case, that was the extra reason to try to learn something new and different, and after searching for a suitable second language, I kinda settled for F#. (I have also tried Haskell, but never managed to move past some basic examples)

Re:Ask HN: Why isn't F# more popular? by emperorcezar on Wednesday May 31, 2017 @01:22PM (#14454258)
Most 9 to 5 programmers can stick with the mainstream languages then. I'll be doubling my productivity by learning idioms that don't come in the Java/C# book.

Productivity isn't always measured by direct output. If I write something with 20% overhead that is 3x more robust, then it's worth it. This is what I see F#/Clojure/Haskell providing.

Re:Ask HN: Why isn't F# more popular? by ice109 on Wednesday May 31, 2017 @09:42PM (#14457346)
lol maybe you're a Haskell ninja but I'm still 10x more productive than you because I don't have to implement every single piece of the app (ecosystem++).
Re:Ask HN: Why isn't F# more popular? by emperorcezar on Thursday June 01, 2017 @02:58PM (#14463339)
That's why you'd use Clojure and have access to the entire Java ecosystem.
Re:Ask HN: Why isn't F# more popular? by maxxxxx on Wednesday May 31, 2017 @08:58AM (#14452092)
Agreed. I have tried using F# in my company but gave up after a while. Reasons:

- it's hard to hire people

- most libraries are written for OO style so most code will be written OO style

- most sample code is written in C#

- C# is a pretty nice language. Does F# really provide an advantage?

- will MS abandon F#?

I really would like to see a clear case for F#. When you consider factors like hiring and existing ecosystem the case for F# is not clear to me.

Re:Ask HN: Why isn't F# more popular? by usgroup on Wednesday May 31, 2017 @09:21AM (#14452246)
Data wrangling is a really clear case. I do a tonne of this and it's so much easier in FP.
Re:Ask HN: Why isn't F# more popular? by maxxxxx on Wednesday May 31, 2017 @09:51AM (#14452474)
I can see that. I wish I was in a more self contained environment. But most of us have to glue many different systems together and then FP is harder to pull off.
Re:Ask HN: Why isn't F# more popular? by vram22 on Wednesday May 31, 2017 @02:54PM (#14454975)
Why is data wrangling easier in FP? Is it because of functional composition being like using Unix pipelines (inside the same program)? But one can do that in a procedural language that has functions too.
Re:Ask HN: Why isn't F# more popular? by lobrien on Wednesday May 31, 2017 @06:25PM (#14456417)
Yes, functional composition in part. And while pretty-much-everyone has first-class functions now, they're usually not _quite_ as easy to declare and use as they are in F# (e.g., if you have to specify `Func<string, Func<string, int>> Foo` rather than `let Foo s1 s2 = ... `

Another data-wrangling thing easier in F# (not FP in general) is type-providers.

Re:Ask HN: Why isn't F# more popular? by vram22 on Wednesday May 31, 2017 @06:30PM (#14456448)
Thanks.
Re:Ask HN: Why isn't F# more popular? by usgroup on Thursday June 01, 2017 @09:14AM (#14459939)
In the clojure case, it's because you've got a handful of data types and a massive amount of functions for manipulating them which you just need to glue together in a pipeline.
Re:Ask HN: Why isn't F# more popular? by narimiran on Wednesday May 31, 2017 @09:06AM (#14452137)
> it's hard to hire people

Many other commentators said something like this, so it seems to me that:

Not many people are using F#, because it's hard to find employer who needs F#. And employers don't seek for F# programmers, because there are too few of them.

Re:Ask HN: Why isn't F# more popular? by AstralStorm on Wednesday May 31, 2017 @11:19AM (#14453185)
Moreover, there seem to be no big codebases written in F#.
Re:Ask HN: Why isn't F# more popular? by brjohnstmsft on Thursday June 01, 2017 @02:21AM (#14458360)
AFAIK all of https://jet.com/ is written in F#.
Re:Ask HN: Why isn't F# more popular? by mabbo on Wednesday May 31, 2017 @08:34AM (#14451962)
Scala may be worth a look. You can write libraries using it and pop them into Java code like it's no big deal. There's a few caveats and gotchas, but overall I've been pretty happy with what it's allowed us to do (Apache Spark in Scala especially is lovely).
Re:Ask HN: Why isn't F# more popular? by hota_mazi on Wednesday May 31, 2017 @09:36AM (#14452344)
Scala's future is very unclear, pick Kotlin instead.
Re:Ask HN: Why isn't F# more popular? by AheadOfTime295 on Wednesday May 31, 2017 @04:22PM (#14455596)
Scala 3 first release candidate: https://news.ycombinator.com/item?id=14453196
Re:Ask HN: Why isn't F# more popular? by mabbo on Wednesday May 31, 2017 @12:36PM (#14453834)
Really? I hadn't heard that. Got a reference?