Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to learn Prolog, Haskell for a C# programmer [closed]

Tags:

c#

haskell

prolog

I am a C# programmer, and after going through some wonderful discussions regarding functional programming and declarative programming. I feel I am not good at both :P, so, I was thinking of starting learning prolog, and haskell. Please suggest about the feasibility in doing so. And if I learn F#, then learning Haskell makes any sense ? What qualities these languages would provide me which can help me in writing better c# programs ?

like image 440
pokrate Avatar asked Jul 20 '09 12:07

pokrate


1 Answers

  1. Like the first time you went from imperative to object-oriented, working with functional programming requires a rewiring of how you think things out. The first time you tend to do things in a hybrid fashion until you get the gist of it all. Since you are coming from C# background, I would suggest trying F# as you are likely to get used to it much more quickly since the .net languages share a common framework which is good enough to get you started.

  2. That said going directly to Prolog and Haskell is not a bad idea but you might have to first adjust to the different syntax and libraries of the languages when compared to the leap between C# and F#. Personally, I went from C#/Java to Haskell by means of 2 books: RealWorldHaskell and The Craft of Functional Programming, and managed fine, so there is no reason for you not to be able to do so. :)

  3. Learning F# and then Haskell still requires some work because F# and Haskell are different: the first is "impure" while the second is "pure". Impurity means that certain "side-effects" such as state and IO are intrinsically allowed, while purity means that you don't get them immediately but have to use certain methods (such as monads). Coming from C# it would be perhaps easier to try F# and then Haskell cause of this.

  4. I believe (personal opinion warning), that if you want to become a better C# programmer, learning about F# and Haskell (or anything for that matter) can never hurt! Especially in the case of F# which can be integrated with C#. Functional programming may facilitate certain things for you and knowing it might become useful sooner or later especially since it seems, like the others said, that there is a current trend towards functional language programs.

like image 152
Andrew Calleja Avatar answered Oct 03 '22 16:10

Andrew Calleja