by ique on 11/30/14, 8:46 AM with 68 comments
by tel on 11/30/14, 3:44 PM
Usually this is achieved by representing the pattern exactly in the language. Usually the patterns are just maths. Usually math happily quantifies over higher-kinded types. Thus, you really want HKTs in your language.
And to be fair, Haskell does not go tremendously far in this direction. The languages which will truly profit from this are still in gestation.
by adwf on 11/30/14, 2:06 PM
One of the things I'm always thinking when people talk about the merits of various type systems and the problems they solve is: "But I don't have those problems". However, there are a few good examples in there that opened my eyes a little and I'll give type-centric programming a go on my next project. Not necessarily solving problems that I have, but certainly presenting a different, hopefully clearer, way of writing some functionality.
by virtualwhys on 11/30/14, 3:05 PM
Writing Scala in my day job currently (which, for the most part, I quite enjoy) but can see jumping ship if Microsoft's move to Linux is successful. Being able to develop and deploy F# applications on Linux with full blown Type Providers and decent IDE support? Pretty compelling combo, and that's just the tip of the iceberg.
by skybrian on 11/30/14, 8:51 PM
The comparison between Slides 81 and 82 is particularly unfair because the "object soup" actually does deal with the database, SMTP, and so on and the functional version doesn't. If you add those in, you're going to get something complicated: perhaps a bunch of monad transformers or some such?
Slide 104 is misleading. In an imperative language, you can write a decorator function that logs a function's inputs and outputs, and it will have the same API. In a pure language, you can't do that because a function that does I/O has a different type. The flexibility or sloppiness (depending on your point of view) that allows you to do I/O anywhere is really a feature of imperative languages rather than pure functional languages.
by zniperr on 11/30/14, 12:29 PM
The part about functors/monads/monoids is also nice, although I feel like it would be better with the accompanying talk to bind it together a bit more.
by fbomb on 11/30/14, 1:16 PM
by taeric on 11/30/14, 5:06 PM
Seriously, it gives off the impression not that these are going to be better patterns. But that someone simply has a bias against "patterns" as they are promoted in Java and then rails against it saying that they are going back to the root of the word patterns. Ignoring that this is the same path.
by estefan on 11/30/14, 12:02 PM
"Functional Programming in Scala" is also well worth a read as well if you're trying to learn FP... I've found it to be excellent, especially since it has lots of exercises to use for practice.
by robert_tweed on 11/30/14, 4:30 PM
by KurtMueller on 11/30/14, 2:36 PM
I am wondering if there are any other good resources for teaching the functional programming paradigms. Anybody care to recommend me some resources?
Also, I mainly work with Ruby and Javascript in my full time job. Currently, in school, I use Java (in the context of Android, which is on Java 6) and Objective-C (iOS programming). If anybody has any resources regarding functional programming and the previously mentioned languages, it would be most appreciated.
Thanks people!
by fdsary on 11/30/14, 12:13 PM
But is there, except for Clojurescript, any true (like Haskell) FP language for browsers? Something that has the tools, and community to back it, so it's viable to actually make projects in it?
by mercurial on 11/30/14, 10:00 PM
Eg: slide 64 encourages the reader to "Using sum vs inheritance", and then goes on to show the "good" algebraic datatypes (no behaviour, just data) vs the "bad"... multiple class implementing the same interface (which I wouldn't call inheritance).
by 1971genocide on 11/30/14, 10:37 PM
I did not however continue to use haskell since it doesnt have key libraries I need.
I instead adopted livescript,underscore into javascript and was good to go.
by nathell on 11/30/14, 2:38 PM
by dschiptsov on 11/30/14, 2:39 PM
by k__ on 11/30/14, 12:36 PM
by ExpiredLink on 11/30/14, 1:16 PM