Live data from Hacker News

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

fsharpforfunandprofit.com

41–50 of 130 posts

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

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

> this thing where people in .NET-land are skittish about F# because it's not so tightly controlled by Microsoft.

Microsoft's great tooling is what has made (traditionally) it sticky for a lot of developers. F#'s tooling from Microsoft has been a half-hearted effort (organizationally, not speaking of the effort that the F# guys have put in.)

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

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

Usually those are the same people that preach OpenJDK, while forgetting that 90% of the contributions come from Oracle.

And that Oracle alongside Sun and IBM has been there since the begging, and other than IBM, no one else made an offer to buy Sun.

Or if the JVM had died with Sun their languages wouldn't even exist.

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

#44

Earlier quoted context omitted.

Scala is probably the most pragmatic functional programming language to get a job in. It's on the JVM and you can use all the Java libraries, and it also lets you fall back to an imperative style if you need to.

That sounds exactly the same as F# (except there might be more jobs in scala). F# is on .NET CLR and you can use all the .NET libraries, and it lets you fall back to an imperative style if you need to!

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

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

#45
post #21

Earlier quoted context omitted.

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.

Scala is probably the most pragmatic functional programming language to get a job in. It's on the JVM and you can use all the Java libraries, and it also lets you fall back to an imperative style if you need to.

Well, in these cases it's very similar to F#, except it's based on .NET and has different syntax. I guess the main point of the comment above is lacking IDE support - refactoring tools don't exist and autocompletion is also not excelent. Do you know some decent tools for Scala? I don't know much about it, but it could be a very good language if IntelliJ had full support for that.

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

#46
post #45

Earlier quoted context omitted.

Scala is probably the most pragmatic functional programming language to get a job in. It's on the JVM and you can use all the Java libraries, and it also lets you fall back to an imperative style if you need to.

Well, in these cases it's very similar to F#, except it's based on .NET and has different syntax. I guess the main point of the comment above is lacking IDE support - refactoring tools don't exist and autocompletion is also not excelent. Do you know some decent tools for Scala? I don't know much about it, but it could be a very good language if IntelliJ had full support for that.

IntelliJ does have have full support for Scala (through an official plugin): https://www.jetbrains.com/help/idea/discover-intellij-idea-f...

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

#47
post #22

Years ago I was working a miserable job writing boilerplate template code where I had to sub in variables based on certain conditions, it was using a very bland language to look up data from our database and format the output. I wasn't allowed to download any software onto my work computer despite having a technical background. So what I did instead to make my life easier was write F# to create a kind of DSL and crea…

Reads like an opening of a dystopian novel!

Your idea of dystopia is a company having strict IT policies? Wait til you hear what China is doing.

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

#48

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…

It's almost to the point where the deciding factors in choosing between (C#-style) OOP and (F#-style) FP are: - Do you want your data types in one line or 20? - Pattern matching, or large concretions of if-statements? - Race conditions: Quality problem, or fun puzzle?

C# has most of the same pattern matching functionality at this point

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

#49

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.

I work in VS Code (backed by Omnisharp language server) and I like it more than Visual Studio (it seems to be faster and has some good extensions). But it's not the same and does not contain all the features (and all extensions). Sometimes it annoys me that the debugger does not work as well. Other things that may annoy you is that you can't install R# and that VS Code basically ignores your solution file and uses directory structure.

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

#50
I think several interesting points were brought up in this thread regarding the assumption of functional aspects presented in F# by C#. LINQ being the most popular example. I am currently lead to believe that a purely functional application development domain is potentially an overreach of theory in terms of building things that can interact with the real world in very complex and 'functionally-leaky' ways.

My biased perspective as someone who hasn't really used F# very much is this: Perhaps an imperative language such as C# 8.0, with a few high-value functional features sprinkled in, is actually the best of both worlds when viewed through the lens of someone who has to interface with really weird business systems. I use imperative techniques for handling remote calls, exception handling, etc. Then, when I need to work with my internal business logic or models, I can use more functional techniques.

Based on my own understanding and other comments presented here, C# does not seem to preclude the usage of functional approaches to solving problems if you have the discipline and experience to do so. C# also brings with it a host of other benefits in terms of tooling support and simply being able to find other developers who can understand your codebase.

Post reply on HN