Live data from Hacker News

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

fsharpforfunandprofit.com

91–100 of 130 posts

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

#91
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.

I think that F# has a difficult spot in between. Microsoft has enough control over it to effectively kill it (mostly via the ecosystem), but at the same time does not step up and actually "own" it. Since it's still "their" language, anyone considering it would like to see they're still invested in it, which isn't all too obvious at the moment. On the other hand, if they'd distance themselves more, another organization could step up, become the big name behind it, and provide good stewardship. Right now it's just sort of hanging on the side and (at least) outsiders don't know what's going to happen with that, which doesn't inspire much confidence. They just don't seem to care much.

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

#92
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/

My experience with F* is several unsuccessful hours of trying to compile hello world thanks to a complete lack of instructions for configuration and installation.

I hope it's gotten better.

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

#93
I started F# lately and found it absolutely amazing. I come from heavy C# programming, and always find myself reaching out to have sane default like immutable types.

But unfortunately there are still lot of libraries out there for F# which don't support .net core fully. Especially db access ones.

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

#94

OO in F#. there goes the language...

Not true. You actually are not to use OO in F# unless you really have to and there are certain cases where it helps

F# is a pragmatic dual paradigm language where both OO and FP are fully supported and encouraged. There is no "[don't use OO in F# unless you really have to]" sentiment anywhere.

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

#95

Earlier quoted context omitted.

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.

Hopefully F# feeds the ability to have functions at the root of a module into C#. It's a small thing, but needing to put pure functions on static classes gets old after a while.

I know local functions are a recent ish addition to C#. Hoping they keep going down that road.

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

#96
post #44

Earlier quoted context omitted.

Try to use EF, WCF, UWP, WPF from F#.

EF isn't really needed with Dapper and the available SQL type providers. Even still it's totally naturally to have a C# project holding the base EF stuff which you reference from your F# projects

Try to use that argument to sell F# to the large majority of .NET shops.

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

#97
Unlike most commentors my experience with F# hasn't been stellar. I feel the language itself is well designed and the community is great but there is just so much of it.

Any source code that i try to go through is sprinkled with so many new keywords, so many different way of combining stuff, that there seems to be so many syntactical stuff going on. It is really making me struggle.

It just feels like a language where the maintainers are going overboard with. And I am sure that once I understand it, I would love it, but the path to get there is so hard.

Pretty much no tutorials or articles are out there and reading sources for small projects is not viable for me either due to the keyword noise and too many ways to do something.

I did not feel anything like this when I taught myself python, ES6, lua, Crystal etc. F# just feels too big.

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

#98

Earlier quoted context omitted.

The first stepping stone the front-end folks take into server side programming. :D

What would you choose instead if you needed to write a simple web server?

F# with Giraffe is super simple to get up and running and it fits into the rest or the ASP.NET Core ecosystem

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

#99

Earlier quoted context omitted.

C# was usable in VS Code even 3 years ago

How is it these days? Is it “usable” or actually something you want to and enjoy using? Will I be left wanting Visual Studio? I mean I really enjoy IntelliJ, it makes programming Java like slicing butter. But I do want to try F#, people talk so highly of it.

It (well, OmniSharp) is 95%. The 5% can be pretty frustrating (such as the lack of override autocomplete).

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

#100

Unlike most commentors my experience with F# hasn't been stellar. I feel the language itself is well designed and the community is great but there is just so much of it. Any source code that i try to go through is sprinkled with so many new keywords, so many different way of combining stuff, that there seems to be so many syntactical stuff going on. It is really making me struggle. It just feels like a language where…

>Pretty much no tutorials or articles are out there and reading sources for small projects is not viable for me either.

The lack of a good online tutorial is a problem for me as well. F# For Fun and Profit is decent, but I've not found it a good substitute for a book/tutorial.

Post reply on HN