5 ms·
As a side-note, if you want to get into functional programming but don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES"
by bsamuels 13y ago
As a side-note, if you want to get into functional programming but don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" world of Haskell, F# is another excellent choice for a beginner functional lang. You can program in either OOP or functional style, letting you take your time with the transition.
I also toot F#'s horn because it has an amazing resource for learning how to use functional style in your programs: http://fsharpforfunandprofit.com/site-contents/ http://fsharpforfunandprofit.com/site-contents/
A few pages on that site did more for me regarding functional programming than the entirety of LYAH did, and it also has a very nice monad tutorial: http://fsharpforfunandprofit.com/posts/computation-expressions-intro/ http://fsharpforfunandprofit.com/posts/computation-expressio...
- stesch 13y agoNot everybody uses Windows. F# is a .NET language.
- bsamuels 13y agoF#'s compiler is open source. The language can compile into CIL, javascript, and a handful of other build targets.
- liammclennan 13y ago"can compile into ... javascript" I don't believe this is true, at least not easily.
- MichaelGG 13y agoPit and WebSharper are two examples that can turn F# into JS.
- Tehnix 13y agoHeard about Mono? http://fsharp.org/use/mac/ http://fsharp.org/use/mac/ http://fsharp.org/use/linux/ http://fsharp.org/use/linux/
- levosmetalo 13y agoAre you serious?
- Tehnix 13y agoCare to elaborate on that?
- JadeNB 13y agoI suspect that levosmetalo (https://news.ycombinator.com/item?id=7538317 https://news.ycombinator.com/item?id=7538317) is referring to the common perception (on whose correctness I cannot comment) that Mono has considerable drawbacks, a perception to whose existence a quick Google search will attest (https://www.google.com/search?q=Mono+drawback https://www.google.com/search?q=Mono+drawback).
- kleisli 13y agoHave you ever noticed that in every post about fp languages there is always a mention about using f#. I've never seen any language-advertisements at this level.
- wwwwwwwwww 13y agoHave you ever noticed that in every post about fp languages there is always a mention about using Haskell. I've never seen any language-advertisements at this level.
- ardz 13y agoIt is Haskell spam wave. Every time there is something about FP lots of Haskell bigots jump out. Well, you could ignore this movement, but you cannot because beneath all of this at its core Haskell is pure immutable BS and actually it is first language with built in bugs because it wouldn't even run without them.
- a-nikolaev 13y agoUse OCaml, it is open source, free and unux friendly. In fact, F# is an adaptation of OCaml for .NET platform.
- krick 13y ago> don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" I really like Standard ML in that sense. Unfortunately, seems to be fading away in sense of popularity.
- JadeNB 13y agoDo you know any good guides to getting started with SML, as LYAH and similar allow one to do with Haskell? Also, can you recommend any particular implementation?
- mtct 13y agoAlso on F# and functional programming two introductory video series from microsoft: http://channel9.msdn.com/Series/C9-Lectures-Dr-Don-Syme-Introduction-to-F- http://channel9.msdn.com/Series/C9-Lectures-Dr-Don-Syme-Intr... http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Func...
- raphaelj 13y agoSince I learned Haskell and it became my first language years ago, I was used to not be surprised by other language features. The "Haskell does it better" syndrome. Anyway, I needed to do a small .NET work two years ago. I choose to try F#. It was the first and only time I got highly please by another language features. Actually, I've to admit that I was pissed of : F# may well be a better language than Haskell.
- Dewie 13y agoSo what features sets F# apart?
- tel 13y agoThe ones I've been envious of (as a Haskell developer) include .Net library integration, type providers, and active patterns.
- raphaelj 13y agoType providers when using a remote API blown my mind.
- manilafolder 13y agoI'm sorry for my ignorance, but there's something about type providers I just can't wrap my head around. It seems like the primary purpose of using a typed provider is so that the types (classes) can dynamically change during runtime (for example, you get different table objects for the different connection strings you pass in). But how do you program a client against an API that can change at will? Is your client code just basically doing runtime reflection on the data the type provider returns?
- liammclennan 13y agoMy understanding is that type providers define the types at compile time.
- 13y ago
- anon_d 13y agoAlso, if you don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" style code, try Haskell. Imperative programming in Haskell is great! The language evaluation rules may be purely function, but your code doesn't need to be.
- coolsunglasses 13y agoTo provide an example of why this is complete and utter nonsense, BEHOLD, an example of imperative AND mutable programming in Haskell: http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions-are-wanted.html http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions...
- JadeNB 13y ago> To provide an example of why this is complete and utter nonsense, BEHOLD, an example of imperative AND mutable programming in Haskell: It seems that 'this' here must not refer to the parent post (https://news.ycombinator.com/item?id=7538461 https://news.ycombinator.com/item?id=7538461): > Also, if you don't want to make the full leap into "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES" style code, try Haskell. Imperative programming in Haskell is great! The language evaluation rules may be purely function, but your code doesn't need to be. with which you seem to be agreeing. Perhaps it refers to the grandparent post (https://news.ycombinator.com/item?id=7537877 https://news.ycombinator.com/item?id=7537877), specifically to its implicit claim that Haskell programming involves "PURE EVERYTHING MUST STAY CLEAN DONT BREAK THE RULES"?
- coolsunglasses 13y agoCorrect, I agree with anon_b and it's very obvious bsamuels hasn't built anything in Haskell.