Hacker News new | past | comments | ask | show | jobs | submit login

http://fsharpforfunandprofit.com/posts/classes/ starts off with a C# vs. F# class declaration example. Particularly when you want to create a class with 3 member properties and a constructor accepting those 3 properties as parameters, you can achieve that in 4 lines of F# vs. 8 (non-curly brace) lines of C#.

This sort of conciseness is found all over the language as you keep digging deeper. I really recommend Scott Wlaschin's (link author) entire site. The best online resource for learning F#, IMO.




Just to nit-pick: C# 6 should bring this particular case on par with F# if I remember well.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: