5 ms·
Out of curiosity: can a developer totally foreign to .NET, C#, and Windows programming in general become productive with F#? (I mean, without having to learn t
by nnq 11y ago
Out of curiosity: can a developer totally foreign to .NET, C#, and Windows programming in general become productive with F#?
(I mean, without having to learn the rest of the Microsoft ecosystem)
- KurtMueller 11y agoI have! Of course, I've only used F# with Unity3d.
- maxaf 11y agoF# depends on the .NET runtime for everything it does. Yes, you could write trivial programs in F# without delving far into .NET and its standard library. No, you can't go far beyond that without knowing stdlib APIs and using Microsoft's (or Mono's) implementations of said APIs. This isn't a bad thing: knowing the runtime well is a very marketable skill, and helps you write better software anyway. See it as an opportunity rather than a liability.
- saosebastiao 11y agoYes. I had experience with Scala which is another ML dialect, and that helped. The more you end up using external libraries, the more you'll have to understand interop between F# and C#. That sort of thing bit me with Xamarin in the past, but it looks like it is getting better (I hope!).
- Delmania 11y agoYou don't need to learn either C# or Windows programming in general to use F# effectively. .NET is a different story, as it provides a lot of core functionality. F# was the first cross-platform language from .NET, so it has better supported on OSX and Linux platforms.
- smoothdeveloper 11y agoI'd say yes if you have exposure to Java library & ecosystem, because .NET Framework's Library has a similar flavor to Java Standard Library. There are also a bunch of F# centric projects (http://fsprojects.github.io/ http://fsprojects.github.io/) which might help you to stay in mostly functional programming land and not mingle too much with OOP. The main difficulty is to get runtime working well, I think Mono has come a long way and is now well packaged and stable enough to get a good experience of the language, thanks to Xamarin who really invested a lot of efforts. Microsoft is allegedly working on its open source implementation of .NET Framework and runtime, which just landed official F# support, but I think right now the experience and eco-system support has catch-up to do with what can be done with Mono. Hope this helps!
- MichaelGG 11y agoYes. I've had several people come onto an F# project with no prior experience in F# or ML or anything like it. They were all able to get up to speed. To start, F# makes it easy to write imperative, C#-style code anyways. Over half of these people have since said they LOVE F#, and it makes them happy to use it. That it makes them better programmers, and that C# is just verbose and annoying in comparison. As far as the Windows ecosystem, you don't need to learn much about it, though Visual Studio is a great IDE for F#. But there's IDEs on Linux and Mono specifically says they support F#.
- cannam 11y agoWhat do the other half say? (Honest question. I'm very interested in the question of the approachability of functional languages)
- smoothdeveloper 11y agoMy hypothesis is that other half says: * Code is less clear than C style (type inference, not used to some pervasive operators like function composition or piping) * Code is terse and short names are more prevalent (Lost the way to kingdom of nouns) * There is no Resharper support, and Visual Studio (the main IDE with F# support) tooling is not as advanced as for C#, which is impairing to some extent if you look use the language like a glorified C# and not too used to F# way (tooling is great compared to many other languages IMHO) * There is no do/while or goto or break
- jackfoxy 11y agoFSharp Power Tools is about all the IDE tooling I care about. I think coming from the OO world developers just expect a whole bunch of add-on tooling. Once you are comfortable with the functional-first way of doing things you find almost all of this unnecessary, except perhaps for some rather basic refactoring support, which FSPT provides.
- smoothdeveloper 11y ago
- ak0s 11y agoBut why? I mean, F# is a great language, but there are so much options for non-Windows systems with better tooling and ecosystem and larger communities etc. F# is my primary language because it is the best on MS stack.
- ubertaco 11y agoAnecdotally: I picked up Okasaki's book on Purely Functional Data Structures as a way of learning FP (to learn Haskell). All the examples were written in Standard ML, so I then started picking up SML. I heard that OCaml was more widely used than SML, so I tried OCaml. The libraries (which stdlib do I use? why is this JSON parsing lib so complex?), build toolchain (oasis? make? corebuild? ocamlbuild?), and cross-platform story of OCaml was another hurdle on top of just the language that I didn't want to deal with. Ironically, I then jumped to F# since I figured at least the tooling had to be better (since it was a .NET language). I have zero experience with the .NET stack, and my entire use-case for Windows is "use Steam to stream games to my Linux machine hooked up to the TV." The tooling in a non-VisualStudio, non-Windows way is actually pretty good; Installing Mono is easy, and from there I'd recommend grabbing Visual Studio Code and the Ionide plugin for it. (Or, if you're a vim guy like me, vim-fsharp is also pretty good). Paket for dependency management is good and kinda like what you'd expect to see in the Ruby world, and and FAKE is a good build system so that you don't necessarily have to touch the nasty MSBuild stuff too much. There's another project, Forge, in the works for automating away MSBuild's nonsense so that you don't have to deal with it (too much), which is good.