4 ms·
more improvements that allows more concise code and that looks functional in nature. Which is great, I have to do a lot in C# and really like it as a OO / with
by keithnz 10y ago
more improvements that allows more concise code and that looks functional in nature. Which is great, I have to do a lot in C# and really like it as a OO / with functional abilities type language.
But I keep wondering why F# doesn't really take off given a lot of peoples fascination with the functional world. It does functional nicely while still being able to bridge back to the OO world which allows you to easily leverage a LARGE amount of libraries in the .net world. It has a really good community, and F# specific frameworks for various things as well. It's like a hidden gem that people pass over as they look at functional languages with much much smaller ecosystems.
- bad_user 10y agoI only played with F#, but my day job is writing FP code in Scala, so let me answer this: > I keep wondering why F# doesn't really take off given a lot of peoples fascination with the functional world As a matter of fact there aren't that many people interested in FP, mostly due to a lack of education on the matter. Even many people talking about FP are confused about what FP is. And the problem with the FP ecosystem are the abstractions, which tend to be extremely high level and very productive, however these aren't taught in school and the cost of entry is high. So let me throw this question right back at you: why F# and not Haskell? And note that the answer you give is going to be applicable to C# versus F# and at the same time flawed ;-) And you see, raising the abstraction is one way humanity has always tackled complexity, however this is essentially about vertical scalability of talent - or in other words enabling the same people to handle more challenging problems by giving them better tools. But the trouble is that this is incompatible with horizontal scalability, which is about growing by hiring more and more people, i.e. building assembly lines. So going back to your question, the reason for why not FP is actually simple, but hard to swallow: the software industry is growing due to huge demand, as a consequence a majority of people working in this field are beginners and when the industry has a choice between quality and quantity, it will go for quantity at the expense of quality. On the other hand the good news is that with the proper education, mindset and tools, as a small team, you can still build products that compete with big companies having virtually unlimited resources.
- keithnz 10y agowhy F# and not Haskell? Now we are leaving the .NET world. We are leaving a lot of libraries behind that bridge to many many things. For instance, my latest F# project was to make a REST service that bridged to a Digital I/O board, the DIO board manufacturer has .net libraries for their devices, I simply wrapped those, used Suave.io, 50 lines of code later I have a webservice for control of DIOs. The point about why F# is really good is the huge amount of libraries you get for free that very few other functional languages enjoy ( JVM based languages would enjoy this advantage too ), you can make bridges to other languages / environments, but that's not quite as straightforward. So to me, it's not the same argument.... F# -> Haskell (lose the libs) C# -> F# (don't lose the libs). Not only that, you can sprinkle it into your projects before fully committing to it.
- ungzd 10y agoMost of Microsoft technologies customers are orthodox enterprise companies. They're still using VB and SourceSafe and will not be attracted by ML-like language. So Microsoft is marketing F# cautiously. But unlike Java world where J2EE suits and Scala/Clojure hipsters coexist (but hugely separated), .NET is in just beginning of transition from Windows-only Visual Studio-only. It's hard to convince people outside of old Windows Server .NET camp to even try these technologies. Recently I tried F#: build process is still painful, involving msbuild files designed for IDE first, build system second, based on XML, with reverse slashes and absolute paths, reminded me of mix between Windows Registry and Apache Ant. MSDN is painful and enterprisey, with 5-10 second page load times. F# is quite nice (much cleaner and simplier than Scala for example) but still not feels really great. I can't figure out how to do basic polymorphism in it: someone recommended to use classes and interfaces but I don't want OOP at all. Standard library has few polymorphism too: Seq.map, List.map, Set.map. Records are great but type inference behaves strangely.