Live data from Hacker News

A whirlwind tour of object-oriented code in F# (2012)

fsharpforfunandprofit.com

81–90 of 130 posts

Re: A whirlwind tour of object-oriented code in F# (2012)

#81
post #8

The problem is F# doesn't get enough resources internally at Microsoft. How many times has VS shipped missing the latest version of F# tools? In terms of community, it's tiny. If I want to do functional programming, F#/.NET isn't the strongest option. I have several books on F# and as much as I'd like to learn/use it beyond toying around, I can't help but feel like all it's worth using for is tinkering (outside of th…

I find this to be an interesting cultural phenomenon, this thing where people in .NET-land are skittish about F# because it's not so tightly controlled by Microsoft. Meanwhile, I'm pretty sure nobody even wants Oracle to be getting involved in Kotlin or Scala or Clojure.

openjdk exists though and is broadly maintained. i don't know how many people use mono (i honestly don't know) but CLR seems to be the only runtime for F#.

Re: A whirlwind tour of object-oriented code in F# (2012)

#82
post #8

The problem is F# doesn't get enough resources internally at Microsoft. How many times has VS shipped missing the latest version of F# tools? In terms of community, it's tiny. If I want to do functional programming, F#/.NET isn't the strongest option. I have several books on F# and as much as I'd like to learn/use it beyond toying around, I can't help but feel like all it's worth using for is tinkering (outside of th…

Isn't VSCode & Ionide plugin good enough?

Re: A whirlwind tour of object-oriented code in F# (2012)

#83
post #8

The problem is F# doesn't get enough resources internally at Microsoft. How many times has VS shipped missing the latest version of F# tools? In terms of community, it's tiny. If I want to do functional programming, F#/.NET isn't the strongest option. I have several books on F# and as much as I'd like to learn/use it beyond toying around, I can't help but feel like all it's worth using for is tinkering (outside of th…

Isn't VSCode & Ionide plugin good enough?

VSCode doesn't hold a candle to Visual Studio. I know that's going to be an unpopular opinion around here. Sure there's Rider (which I own/support/like), but if MS can't be bothered to provide first-rate support for F#, why should I bother investing time into learning F# when there are more popular alternatives?

Re: A whirlwind tour of object-oriented code in F# (2012)

#84
post #21
post #8

The problem is F# doesn't get enough resources internally at Microsoft. How many times has VS shipped missing the latest version of F# tools? In terms of community, it's tiny. If I want to do functional programming, F#/.NET isn't the strongest option. I have several books on F# and as much as I'd like to learn/use it beyond toying around, I can't help but feel like all it's worth using for is tinkering (outside of th…

What is the strongest option for functional programming then? I love Clojure as a language but it's almost impossible to find decent jobs with it in my area.

What about remote work?

Re: A whirlwind tour of object-oriented code in F# (2012)

#85
post #29
post #28

If you want to try F#, here's the full F# compiler in the browser run using WebAssembly. Very fun to play with: https://tryfsharp.fsbolero.io/

And it also compiles to Javascript: https://fable.io/repl/ You can browse through some sample apps using the side bar on the left.

Thanks for posting that. Fable is fantastic

Re: A whirlwind tour of object-oriented code in F# (2012)

#86
post #4

F# is a joy to use. After a certain time, many C# developers find themselves writing in a functional style. F# makes this the default, but lets you continue using all of your existing code. Better yet, Linux and macOS support via .Net Core is excellent. F# on .Net Core is now a powerful alternative to Node.js.

The thing I find most interesting about a lot of C# developers I've worked with, trained, etc. is their understanding of "Object Oriented" programming. I have the same discussion over and over again. "Have you looked at F# even to just to see how it works?" "I won't ever use it. I'm an OO programmer, and it suits me just fine!" "Do you use LINQ, and understand you can pass functions into methods etc.?" "Yeah, it make…

There are C# programmers like that I suppose. There are also many C# programmers who buy into multi paradigmism, they fee no ideological conflict between using OO or FP as needed. C# supports FP well enough, and gets better every release (eg pattern matching). It’s difficult to compete with C#, especially when F# is feeding features into it.

Re: A whirlwind tour of object-oriented code in F# (2012)

#87
post #15

I used to be a big Haskell programmer. While I still love the language, I've really come around to the idea that strictly evaluated functional languages like F# or OCaml are the best for programming in. You get the nice functional features but don't have the straightjacket of laziness forcing you into certain design decisions. It's really nice sometimes to be able to mix in impure, side effectful code without having…

I'm not saying it's a replacement for either F# or OCaml, and I've only glanced at it, but F*[1] looks pretty neat. It's higher-level than F# (a lot) and has a syntax more similar to Haskell's. You can even extract programs in F# and OCaml.

[1] https://www.fstar-lang.org/

Re: A whirlwind tour of object-oriented code in F# (2012)

#88
post #79
post #68

Earlier quoted context omitted.

C# 8.0 will have a switch expression: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh... .

As C# gradually becomes F#, I have to wonder, why not just use F#?

You aren't wrong, but a lot of people are only comfortable in one language/style of language (so either just say Java/C#/c++ or maybe all Algol derived languages). Growing beyond that can be scary until you've done it a couple times if you wait until later in your career to start trying things like say Lisp or Haskell.

Re: A whirlwind tour of object-oriented code in F# (2012)

#89
post #55
post #4

F# is a joy to use. After a certain time, many C# developers find themselves writing in a functional style. F# makes this the default, but lets you continue using all of your existing code. Better yet, Linux and macOS support via .Net Core is excellent. F# on .Net Core is now a powerful alternative to Node.js.

> After a certain time, many C# developers find themselves writing in a functional style If you can't move to F# or find its tooling abysmal and slow then I have a library [1] that makes the inertia flow positively in the functional direction in C# https://github.com/louthy/language-ext/

Hah, the internet is such a small place.

I thought that library looked familiar, and realised I was looking at it earlier today when I set up some F# job filters on stackoverflow (you're the only F# job on there that doesn't involve moving to London).

Re: A whirlwind tour of object-oriented code in F# (2012)

#90
post #73
post #5

While there's nothing you can do in C# that cannot be done in F#, the reverse is not true. The biggest thing that comes to mind is to influence the direction of the other language (C#). I've heard it said many times that if you want to see what features will be in C# in the future, look at F#. Too many features to cite (though Linq is the biggest that comes to mind) were in production use in F# long before they arriv…

> While there's nothing you can do in C# that cannot be done in F# Really? When did F# start supporting pointers? > to influence the direction of the other language (C#) Lately, it seems it's the other way around: C# is introducing features like Span or default interface members and F# is (quickly) catching up.

To your last point, with the freedom they seem to feel after the Core breakage (like Span/Memory) C# might start innovating on its own again instead of just taking awesome pieces from f# and making them part of C#.
Post reply on HN