Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learning .NET from F# without C#

Tags:

.net

f#

ocaml

I'm a Java/C++ developer that never spent time in learning C# and the relative .NET foundation.

Then I learned OCaml because I had to use it for my master thesis so I heard about F# and wondered: will F# allow me to easily use the .NET API to build fully featured applications (that may involve GUIs, sockets, whatever) without any problem?

I ask this because it seems that F# syntax and concepts are quite similar to OCaml and when they are different it's just because a more OOP approach is used so Java knowledge would help me in filling that hole.. if F# is able to use the same resources as C# without the need to learn C# syntax I would really consider that.. is it worth trying?

Apart from that, are the books available on Amazon for F# (mainly one book from O'Reilly and 3-4 books from Apress) good to learn advanced techniques? Because now I'm quite fond of functional programming but never worked on .NET platform so I really don't know where to start from.

Thanks in advance

like image 846
Jack Avatar asked Jul 15 '10 15:07

Jack


People also ask

Is .NET difficult to learn?

NET easier as compared to Java. The reason behind it is . NET being a framework. Choose to learn .

Is .NET easy to learn for beginners?

Everything is C# and has the same or similar code. Dot net is a user friendly and its very easy to learn .. I recommend to start with java because it is a strong and professional language and relatively simple compared to C + +.

Can I learn .NET without learning C#?

NET Common Language Runtime, allowing web pages to be coded in VB.NET, C#, J#, Delphi.NET, Chrome etc. This means you don't have to learn C# to use it and, even if you don't know any of those languages, you may find it easier to start with a more human readable one such as VB.NET.


2 Answers

If you know a few languages already like you say, Expert F# 2.0 by Don Syme is an excellent in depth view of F#.

Mostly you'll struggle with learning the libraries, but the MSDN reference is pretty good.

I think it's most definitely worth trying. Knowing C# won't give you any great advantages in learning F#, apart from the experience with the framework.

like image 79
Mau Avatar answered Oct 24 '22 19:10

Mau


will F# allows me to use easily the .NET API to build fully featured applications (that may involve GUIs, sockets, whatever) without any problem?

I expect to see a few different perspectives here; I'll offer mine.

There are a few aspects to a 'language' that affect how easily/smoothly you can build 'fully-featured' applications with it:

  • the language itself
  • the library/framework it is paired with
  • the tooling capabilities (IDE integration)
  • outside support (samples, 3rd-party libraries, community)

F# is a terrific language, whose core is based on OCaml. It shares the same library/framework (.NET) as C#, and so with regards to the first two bullets, F# is as capable as C# for building such apps.

F# is a number of years younger than C# though, so both the Visual Studio tooling and the community/samples are not as mature as that of C#. Right now, there are fewer 'project templates' and 'designers' that work with F# in the VS box, and it is harder to find samples/libraries. The F# community is great, and is rapidly starting to fill in the holes of the 4th bullet (and even some of the third), but for building apps that would rely heavily on the 3rd and 4th bullets above, C# still has an advantage today (July 2010). Yes, you can build anything you like today with F#, but there are still cases, wher the end-to-end experience with C# will be smoother/easier.

like image 42
Brian Avatar answered Oct 24 '22 18:10

Brian