4 ms·
What I Wish I Knew When Learning Haskell
- platz 12y agoI wish I knew what changed from the last time this was posted 2 months ago: https://news.ycombinator.com/item?id=7637278 https://news.ycombinator.com/item?id=7637278 Also I believe last time Stephen was surprised folks had gotten a hold of content on his "pre-prod" domain (e.g. http://dev.stephendiehl.com/ http://dev.stephendiehl.com/), because he was still working on that post, before it was ready. I like points as much as the next person, but maybe "pre-release" content should not be posted to aggregreators like HN before they are "realeased" That said I'm excited he's continuing to update this series, it's helped a lot of people and there is a ton for me to learn still!
- tenslisi 12y agoIt appears to be twice as long as the old 2.0 version, and a lot of the latest GHC 7.8 topics which wasn't released before the last version.
- platz 12y agoThat's helpful, thanks
- intull 12y ago> I wish I knew what changed from the last time this was posted 2 months ago: https://news.ycombinator.com/item?id=7637278 https://news.ycombinator.com/item?id=7637278 Reposts may not be encouraged but it gives the chance for new followers and those who missed seeing this post before. Not to mention the added karma for the poster. On the other hand, for the sake of others, who don't know, please visit http://hn.algolia.com http://hn.algolia.com to check if something's already been posted!
- dang 12y agoIt's a good article, but has had three major discussions in about the last year: https://hn.algolia.com/?q=What+I+Wish+I+Knew+When+Learning+Haskell#!/story/forever/0/What%20I%20Wish%20I%20Knew%20When%20Learning%20Haskell https://hn.algolia.com/?q=What+I+Wish+I+Knew+When+Learning+H... So I think this one counts as a dupe, even though the content has been augmented.
- taeric 12y agoI have to say that this line irks me: "Any preconceptions one might have for the word 'return' should be discarded, it has an entirely different meaning." This sentence literally does nothing to help me even prepare to understand what is about to be explained. At the least, give a small example of what preconceptions should go. "All of them" implies that someone did a crap job of naming this thing. Edit: Apologies to all responses. I responded to two, but I'm not sure I have different responses for each. If it seems I've ignored some aspect, apologies.
- dpratt71 12y agoMaybe there is some deep mathematical reason why 'return' is named as such, but I suspect the person who gave it that name was trying (perhaps a bit too hard) to make monadic code appear even more like the imperative code to which most of us are accustomed. More or less by coincidence, 'return' tends to appear in the same places you would see the 'return' statement in C and derived languages. But the purpose of the 'return' function in Haskell is quite different from the 'return' statement.
- gphilip 12y agoAll of them. return "lifts" a "plain" value so that it becomes a "monadic" thing. As far as I can see, this has nothing at all to do with returning a value from a function.
- taeric 12y agoRight, but I have preconceptions of the word "return" that have nothing to do with programming. I'm fine if you want to think of it as "returning to the monadic environment." That is, in English, you can return to things just as easily as you can return from them. I may have to forget some of the things that are common in other environments. But to use a word that has meaning outside of programming and to decry that you have to lose all preconceptions of that word, implies heavily that it was named poorly.
- AnimalMuppet 12y ago
- dljsjr 12y agoPersonally, I like to follow the mantra cabal is not a package manager. Because whenever I treat it like one, I get messed up in a bad way. I buy in to this argument[1] as to why it isn't. [1]: http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-me-cabal-is-not-a-package-manager/ http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-...
- CJefferson 12y agoThat argument seems more like (ignoring the naming issues of cabal vs cabal-install), that cabal is a terrible package manager, but still (to me) seems to bare all the major features of a package manager.
- dljsjr 12y agoThe fact that it forwards package registration to the underlying ghc-pkg system, has very poor/nearly nonexistent record keeping, and can't perform uninstall operations are kinda crucial. I've never heard of a packager manager that can't uninstall. If you present it as a package manager, even if it's a bad one, then you also telegraph a certain amount of implied functionality, and in turn the user has a certain level of confidence that the system is smart enough to do its best to prevent you from damaging your package ecosystem (not a guarantee, but at least an effort); cabal and by extension cabal-install doesn't provide this at all. It simply provides a way to install packages and makes a best effort at meeting the build goals required for individual commands to succeed in a vacuum. I hesitate to call that a package "manager". It's just a very mediocre package installer.
- Siecje 12y ago> I've never heard of a packager manager that can't uninstall. easy_install
- Dewie 12y agoI wonder if Haskell will ever get a package manager like Nix.(?)
- deleted 12y ago[deleted]