5 ms·
Anyone getting deeper and deeper into fp is destined to end up with Haskell or purescript. No matter if you start with elm, scala, elixir or reason. Then, of co
by AzzieElbab 8y ago
Anyone getting deeper and deeper into fp is destined to end up with Haskell or purescript. No matter if you start with elm, scala, elixir or reason. Then, of course you work with Haskell for a bit and end up going back to whatever you started with unless your work in PL research or similar
- Touche 8y agoReminder that lisps are FP too.
- deleted 8y ago[deleted]
- AzzieElbab 8y agoJS is a bad lisp
- kjeetgill 8y agoDepends on which lisp and who you ask. For many, functional programming is just as much about expressive type systems, purity, and immutability as is about robust first-class funtions and higher order functions. Lisp is like the python version of Haskell (as compared to Java I guess?) It's a rough metaphor but I think it makes enough sense.
- Touche 8y agoI know that many today use "functional" to mean ML-derived languages but that definition is incorrect. Lisps are not very much like Haskell at all, and have different goals. Which is why today's ML-centric worldview of functional programming so often forgets about them.
- tazjin 8y ago> Then, of course you work with Haskell for a bit and end up going back to whatever you started with Why do you think that? Haskell sees pretty widespread industry usage these days.
- AzzieElbab 8y agoIn my experience Haskell is exactly what one of it's creators called it "a DSL for writing DSls". Elm can be viewed as one of such dsl, occam razor focused on web front-end. Otherwise,90% of the time you are stuck in IO along with some really hard to grasp libs to help your pl learnings and rarely anything else
- Tehnix 8y agoI'm not really sure what you're trying to get at? While, sure, Haskell excels at making (e)DSLs, it's far from the only usage for it. For web development it's quite good as well, a long with a ton of other areas. There are plenty of practially oriented libraries, and at the same time, also plenty of libraries focused on using as much of the advanced type system as possible.
- efnx 8y agoThis is simply not true.
- hardwaresofton 8y agoI think you're mistaking Haskell for Lisp?
- vmchale 8y agoI'm not really sure what you mean by "stuck in IO" but that's a consequence of laziness so it's pretty much unavoidable in FP in general. As for "hard to grasp libs," I find them much easier to use than C libraries. They're actually quite well suited to certain domains.
- sridca 8y ago> Haskell sees pretty widespread industry usage these days. Yes, just for one example: https://www.reddit.com/r/haskell/comments/86cg1u/jobs_obsidian_systems_is_hiring/ https://www.reddit.com/r/haskell/comments/86cg1u/jobs_obsidi...
- st1ck 8y ago
- ihm 8y agoWhy do you include Reason? Reason is just an alternate syntax for OCaml which has a "fancy" type system like Haskell or purescript.
- AzzieElbab 8y agoWell, typeclasses and monads are not easy to implement in ocaml, to the best of my knowledge
- zem 8y agomonads are; there's just no syntactic support for them in the language, so they're a little clunkier to work with than they are in haskell
- ihm 8y agoWe use monads extensively (with monad syntax provided by the ppx_let extension) and OCaml also has a sophisticated module system that is useful in a similar way that type classes are. I would say type classes and a good module system are essentially incomparable language features though, and programming in Haskell always feels painful to me once you get to a few files without modules.
- star-techate 8y agoLaziness is a superficially useful anti-feature. I'd suggest waiting with OCaml until dependently-typed languages become more practical.
- vmchale 8y agoThis is simply false. One can debate laziness as a default, but pure immutable languages need laziness.
- star-techate 8y ago> pure immutable languages need laziness https://mercurylang.org/ https://mercurylang.org/ If you put the most valuable thing in the universe inside a box that can't be opened or permeated by any force in the universe--then that thing is no longer valuable. Go find the former #2. If you have a programming ideal and that ideal requires laziness--then you've messed up. You have to conclude that there was something flawed about the ideal. I'm a lot more confident about laziness being bad than about what you're thinking of as "a pure immutable language" being bad, but part of the problem about laziness is that it's a feature apart from the language it's in. If you implement a cache with a hash table in any normal language, then you can later on check and see how much data you have cached, keep track of your cache hit rate, empty the cache, pre-load your cache from a previous run, and so on. To work with your cache, you have the language itself at your disposal. If you implement a cache with a lazy list in language X, then language X can't help you. You'll need to hope that whatever Gods dangled laziness before you, also have some tools dangled elsewhere.
- vmchale 8y ago> If you put the most valuable thing in the universe inside a box that can't be opened or permeated by any force in the universe--then that thing is no longer valuable. Go find the former #2. If you have a programming ideal and that ideal requires laziness--then you've messed up. You have to conclude that there was something flawed about the ideal. Not at all what I am talking about. Please consult the literature on the subject and then we can continue this conversation as equals.
- vmchale 8y agoI am currently employed full-time writing Haskell.