4 ms·
This is really exciting. I do about 50% of my commercial development work in VB .NET (the other 50% in Python), and I hate hate HATE working in VB. Convincing t
by sbrother 14y ago
This is really exciting. I do about 50% of my commercial development work in VB .NET (the other 50% in Python), and I hate hate HATE working in VB. Convincing the suits to go with Python would be near impossible -- too many processes rely on .NET -- but this seems like it could a be a great compromise. Sane, fast, modern language but with the full power of .NET libraries.
Can anyone recommend a good resource for learning F# for the .NET developer? I don't need an intro to functional programming (I have a pretty functional style in python and I've messed around with Haskell) but just a well paced intro to the syntax and standard library.
- raphaelj 14y agoThe book by Don Syme (one of the F# creators) is pretty good as it gives an short, yet complete, introduction to the language to people with a functional and .NET background. http://www.amazon.com/Expert-F-3-0-Apress/dp/1430246502/ http://www.amazon.com/Expert-F-3-0-Apress/dp/1430246502/ I've started functional programming by reading the book about F# by Tomas Petricek. It was really good because it target learning functional programming to someone who have a solid OO background. http://www.amazon.com/Real-World-Functional-Programming-Tomas-Petricek/dp/1933988924/ http://www.amazon.com/Real-World-Functional-Programming-Toma...
- mjt0229 14y agoI've been reading Chris Smith's book: http://www.amazon.com/Programming-F-3-0-Chris-Smith/dp/1449320295 http://www.amazon.com/Programming-F-3-0-Chris-Smith/dp/14493... With a background in FP, I can go through the book at a walking pace. It starts off with the basics, though, so it might not get into the nitty-gritty details that would interest you if you're already familiar with .NET and FP.
- noblethrasher 14y agoWhat do you hate about VB? I'm a C# dev that thinks in terms of F#/ML but I've long recognized that VB is actually a more expressive language than C#, especially if you want to write OOP in a functional style. For instance, VB has better IDE support for expressing sum types, doesn't require type annotations for lambada expressions, and has more Linq (query comprehension) operators. Edit: I'm wrong about the "better support for sum types", I was thinking of Completion List feature but it doesn't quite give you a proper sum type (though it comes close).
- jimmaswell 14y agoVB.NET also doesn't allow #region's in method bodies, and can't use unsafe code. I've found C# to feel more concise, clean, and have less annoying hard to predict syntax. If .. End If, While .. End While, but For .. Next? I'd expect End For. The attempt to make it look more like words just made it more annoying to me. VB.NET's syntax feels too verbose. C#'s feels more like a good spot where it's very similar to C++ and Java, but not alien.
- mercurial 14y agoIn my experience, if you use #region in the body of a function, it is a sign it needs refactoring.
- e12e 14y agoWhile I'm sure F# is nice -- any reason why you wouldn't/couldn't use Iron Python? Is it "dead" ?
- rjzzleep 14y agoimho, pretty much. you can do pretty much everything in ironpython, but i can't see you getting much support for it in a .net shop. the latest books for it are pretty old too, and overall it doesn't seem very active. f# has lot's of pythonish elements anyway. and the clr bindings are better documented
- ppog 14y agoI second rafaelj's recommendations, and there is also a good interactive tutorial from the F# team: http://www.tryfsharp.org/Learn http://www.tryfsharp.org/Learn. You may find it a bit slow paced given your FP experience but it may be a good way to actually try out the syntax rather than just reading about it.