What do you think of the F# language? I would like to learn it's positive and negative points.
What is your experience with this language? When should or shouldn't someone use F#?
See also: F# at Microsoft Research
|
What do you think of the F# language? I would like to learn it's positive and negative points. What is your experience with this language? When should or shouldn't someone use F#? See also: F# at Microsoft Research |
|||||||||||||
|
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
I have mixed feelings about F#. I have a strong functional programming background and many years of C# experience, so I can see it from both sides and I think that F# makes too many compromises to satisfy people from either group. It's worth pointing out as well that .net is fundamentally an object-oriented imperative execution environment. It's not terribly well suited to a language like F#, so there are compromises to be made everywhere. At the end of the day, all F# programs need to be turned into a pile of CLI types and methods which, largely, have C#-like semantics. There is a lot to like about F#, but I'm going to focus on the negative here, since the good things are more obvious and well documented.
|
|||||||||||||
|
I love it!
Pros:
Cons:
I've been building products and providing services around F# for 4 years.
Impossible to say without more specifics. Find little projects and give it a try. I'm sure you'll be amazed. :-) Cheers, |
|||||||||
|
|
Here are a few reasons F# is a great language to learn:
Check out this little piece of my parser that uses partial active patterns to match productions in the ECMAScript language.
Explanation When you specify an active pattern like This production in the ECMAScript language:
is matched with the following code
Another way you can write an active pattern is like this:
Notice that every number passed in will return a match.
|
|||||||||||
|
The problems are:
|
|||||||||||||
|
|
As a C# programmer who has recently been exploring F# by reading The F# Survival Guide, I can't help thinking that if I'd been exposed to it back when we were still using C# 2.0, I would have thought it was awesome. Now, however, that C# 3.0 has added LINQ and type inference and anonymous types and lambda expressions and all the fun with IEnumerables, I feel like all the things would have been better expressed in F# can now be expressed pretty damn well in C# too. Also, as a stylistic judgement, my gut feeling that there was way too much going on with punctuation. Too many pipes and underscores and multi-symbol constructs like [| and -> and (| and (_). Reminded me of Perl. I just find that too much meaning attached to punctuation makes for completely unreadable code. |
|||||||
|
|
Well, I wanted to write a simple application to connect to a MySQL database and do mathematical functions on the data. Running functions on data seems to be a natural fit to a functional language. That didn't work well (you can find remnants of the project as questions on StackOverflow). My take-away from that project was that the MS database libraries are ridiculously duplicated and hard to use. Further, the imperative paradigm is hard to directly map to F#. Also, the syntax is 'relatively' easy to read, but very hard to understand well enough to write in a non-trvial fashion. I found at the time (2008) a terrible gap between the "hello world" tutorials and the advanced technique discussion. Today, a problem is that the language has evolved so that the early material on it breaks when compiled today. I have a generalized gripe about whitespace delimiting in general, and F# unfortunately falls in that bucket. So I didn't have a good experience with it. But, I think if you have a full-time project with it, in a domain that maps well, F# is going to be a right solution (Along with Haskell, OCaml, and Lisp). |
|||||||||||||
|
|
I didnt like how classes require me to name the this pointer instead of allowing me to access member variables implicitly. That was the #1 reason for me not to continue learning it. I felt if i cant access member vars easily that many other things will not be easy as well. I also wasnt impress with the go programming language. However i do like boo even tho i never programmed with it. |
|||
|
|