Alois Kraus

blog

  Home  |   Contact  |   Syndication    |   Login
  30 Posts | 8 Stories | 87 Comments | 169 Trackbacks

News



Article Categories

Archives

Post Categories

Image Galleries

Programming

 Robert did write about my F#/C# article where he states that F# is as easy to learn as any other imperative language.
My final comment was:
Not all concepts of functional languages should be explored by Mort and Elvis since most of them are fairly complex to understand because functional languages are very picky (just like unix) who can be their friend and who not. If Einstein does write a F# program then only a true Einstein can maintain it. When the outsourced Mort and Elvis do change his code I am sure they will screw it up
He does argument that any complicated problem will result in more or less complex code which is difficult to understand. F# is much clearer and does require in many cases less code to write. This is true. But since F# and C# are different languages what is the difference anyway? Here is the catch: The F# language itself was designed to allow scientists to write complex algorithms with few lines of code. Humans with high mental capabilities see the immediate value of short and concise code that does not distract the reader with unnecessary syntactic language elements. This high value is at the same time it's Achilles heel. The language is only useful if the code is short and concise. If Einstein plays nice with Mort and Elvis he would comment the code. Every function should be described what its purpose is, what the input variables are and what the result is. But since there are so much more functions defined F# source code  this task of thorough documentation is not very practical. The other problem I have with F# is that there are so many implicit conventions you have to know. Where does the program execution start in a F# project with 50 files? Grep for main? Einsteins have no problems with syntax. All is clear to them. But Mort and Elvis will struggle with the syntax of a language where no explicit main, no explicit function end does exist. The C# syntax is perhaps bloated but at least it makes things much more explicit which is a good thing for the people who have to understand not your algorithm but the overall program structure. Nonetheless I will continue to explore F# because it does help to look at many problems from a different perspective where it does offer some remarkably easy solutions.
posted on Tuesday, May 30, 2006 9:50 PM

Feedback

# re: Is F# Code easy to understand? 5/31/2006 2:02 AM Greg Young
I have to admit it took me a while to _get_ functional languages (and I still don't _really_ get them but can hack my way through). The effort is well worth it though when you have a situation that calls for their types of behavior.

# re: Is F# Code easy to understand? 6/1/2006 8:44 PM Robert Pickering
Hey Alois, this is a good answer!

I agree with you that there is danger, that some one who _thinks_ they really clever might spew out a massive code base and leave it behind hoping that some one else will clean up there mess, but I also think this can happen in any language. To write good maintainable code, it does not matter if you are an Einstein, you have to document as you go along.

I also agree that there maybe problems scaling projects written in F#, my gut feeling that a language with explicit typing, C#, will work better when a code base is shared between a large group of developers and an implicitly type language, F#, works better when the group of developers is relatively small.

Having said that linspire recently announced they where going to do most of there development in Haskell (http://lambda-the-ultimate.org/node/1506). It will be interesting to see how this projects develop as they are shared between the large number of developers in the Linux community.

I disagree too that F# projects won’t scale, the F# compiler and libraries come to about 250 files, but the team seems to be able to maintain them and add new functionality. Then again, the team is pretty small and very smart.


Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 8 and 4 and type the answer here: