4 ms·
It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when i
by ElliotH 10y ago
It's pretty cool being able to get this setup on my Mac and easily play around from the command line. It makes it much more accessible as a language than when it was more closely tied to the Windows/Visual Studio ecosystem.
- douche 10y agoI've probably spent more time messing with F# on my Mint laptop than I have on my Windows desktop... Part of that is that F# doesn't really have the level of tooling that I've come to expect from C# in VS, with ReSharper. I would like a static analysis tool for F# that tells you when you are doing something that is legal, but dumb, as ReSharper does.
- smoothdeveloper 10y agoConsider using https://github.com/fsprojects/FSharpLint https://github.com/fsprojects/FSharpLint I'm not sure if it is integrated to ionide yet.
- cloudroutine 10y agoit is for atom, not yet for vscode
- smoothdeveloper 10y agoOn Windows / Visual Studio, consider using https://github.com/fsprojects/VisualFSharpPowerTools https://github.com/fsprojects/VisualFSharpPowerTools which has some abilities similar to Resharper.
- jackfoxy 10y agoI've also had a great experience with F# power tools, which now provides linting helping me keep the code clean and follow good functional coding practices, especially shorter, simpler functions. And the renaming function it provides is about all the refactoring help I have ever needed. Works great.
- enricosada 10y agoI write lot of c# at work, and Resharper really help. When c# dev see f#, always ask for tooling like resharper. That's because you expect to have same issue/experience of c# development, but it isnt. In F#, there is a lot less need for Resharper help, but that's become visibile only you start writing code, because the compiler help you a lot more than c# compiler Writing f#, lots of the issue fixed/highlighted by resharper are not possibile, the language fix entire classes of problems (like null ref, make invalid states impossibile or really difficult, type safety for external data, etc) And refactoring is really easy, because function usually are passed as value, so less need to rename things. Last is, having less code, there is less to change. Seem a simple reason, but that's it. For example because methods/function doesnt explicitly write class/types in the signature (are infered), there is no need to change it when is renamed. Or refactor: extract function is just indent or move, because compiler will complains about missing capture closure, etc, and with immutable data, it's easy Another really strange feature (it's not a bug) of f# ordering of files, make you cleanly separate types/functions in separate modules, making the creation of entangled code that may happen with c#, really really difficult.
- Lewisham 10y agoCan you point me to instructions for this setup? I'd love to try F# (having dabbled in Haskell) on macOS, but I keep getting the feeling that F# really needs Visual Studio to shine... which is a feeling which may or may not be accurate.
- smoothdeveloper 10y agobrew install mono brew cask install visual-studio-code once you are in vscode, install ionide: http://ionide.io http://ionide.io You are ready to script (or more) with a great / lightweight editor.
- oblique63 10y agoSpacemacs[0] with its F# layer enabled is also painless to set up, if that's more your cup of tea: http://blog.nikosbaxevanis.com/2015/04/25/fsharp-on-emacs-with-spacemacs/ http://blog.nikosbaxevanis.com/2015/04/25/fsharp-on-emacs-wi... [0] http://spacemacs.org/ http://spacemacs.org/
- louthy 10y agoIf you don't want to use mono and want to use MS's new cross-platform version of the .NET Framework, you can use .NET Core [1] (then follow the sibling's advice on using VSCode and Ionide) [1] https://www.microsoft.com/net/core#macos https://www.microsoft.com/net/core#macos
- ElliotH 10y agoI followed the section called "Getting Started with F# 4.1 on .NET Core" in the post. Worked well for me. YMMV ofc.