
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective. Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea. Thanks, Clinton

March 29, 2021 10:24 AM, "Clinton Mead"
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
This article is about Elm, but should generalise to other strongly and statically-typed ML-family functional programming languages: http://nonullpointers.com/posts/2019-05-28-side-effects-of-elm-in-production... (Disclosure: I work for Bellroy, but didn't when the events in this article took place. We are now using Haskell for a small but growing number of backend services.) Key points: * The react build of the checkout took six months and had data loss and error reproduction issues * The react build caused an 8% drop in conversion rate, and nobody could work out why * Some state transitions were missed due to weak typing in redux * The Elm rewrite took three months (1/2 the time, though consider that the devs would have a good handle on the domain at that point) * The Elm version was ~55% the SLOC of the react version * The Elm version had essentially no runtime failures * The Elm version forced the developers to consider all state transitions * The Elm version was much easier to modify, which meant experiments were cheaper to build and run Note: A checkout page seems to be a particularly good fit for Elm because it has a lot of complicated state transitions (so you get a good payoff from adopting types), "getting it wrong" has a large cost (directly translates into missed conversions), and doesn't need to interact with external JS libraries _that_ much (payment SDKs notwithstanding, but that tends to happen at the end of the checkout process). Best, -- Jack

For businesses, it all boils down to can you deliver better value sooner,
and improve it faster and generally improve the business / product offering
in a compelling sustainable way. If you can do that and grow the team to
suport that system so there’s no fear of having a single maintainer they
can afford, , that’s all you need!
Deliver better business value , sooner, and that’s all. !
On Sun, Mar 28, 2021 at 8:25 PM Clinton Mead
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Not bussiness oriented, but these two articles are pretty good at explaining what Haskell and similar languages have to offer: This is brief and centered on Haskell's type system: https://perl.plover.com/yak/typing/notes.html This is longer and more general: http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf Best, Antonio El Mon, Mar 29, 2021 at 11:24:08AM +1100, Clinton Mead escribió:
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Mon, 29 Mar 2021, Antonio Regidor Garcia wrote:
Not bussiness oriented, but these two articles are pretty good at explaining what Haskell and similar languages have to offer:
This is brief and centered on Haskell's type system:
From slide 29 on he gives the example that type inference can point him to an infinite loop.
This would not work in Haskell, would it?

I get the same strange inferred type for this quickly translated program: split [] = ([], []) split [h] = ([h], []) split (x:y:t) = let (s1, s2) = split t in (x:s1, y:s2) merge :: [Int] -> [Int] -> [Int] merge [] x = x merge x [] = x merge (h1:t1) (h2:t2) = if h1 < h2 then h1:merge t1 (h2:t2) else h2:merge (h1:t1) t2 sort [] = [] sort x = let (p, q) = split x in merge (sort p) (sort q) > :t sort sort :: [a] -> [Int] The reason is that sort always returns the empty list, independently of the input list, so the type of the input list is not constrained. On 29-03-2021 19:13, Henning Thielemann wrote:
On Mon, 29 Mar 2021, Antonio Regidor Garcia wrote:
Not bussiness oriented, but these two articles are pretty good at explaining what Haskell and similar languages have to offer:
This is brief and centered on Haskell's type system:
From slide 29 on he gives the example that type inference can point him to an infinite loop.
This would not work in Haskell, would it? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

It's even better if you generalise merge to merge :: Ord a => [a] -> [a] -> [a] Then the type of sort is Ord a => [b] -> [a] and it's more obvious that not only is the input unused but the output is always empty. Interestingly I wrote on article about how to improve a particular program Mark Dominus himself wrote featuring exactly this kind of analysis! http://h2.jaguarpaw.co.uk/posts/using-brain-less-refactoring-yahtzee/ Tom On Mon, Mar 29, 2021 at 07:30:41PM +0200, Jaro Reinders wrote:
I get the same strange inferred type for this quickly translated program:
split [] = ([], []) split [h] = ([h], []) split (x:y:t) = let (s1, s2) = split t in (x:s1, y:s2)
merge :: [Int] -> [Int] -> [Int] merge [] x = x merge x [] = x merge (h1:t1) (h2:t2) = if h1 < h2 then h1:merge t1 (h2:t2) else h2:merge (h1:t1) t2
sort [] = [] sort x = let (p, q) = split x in merge (sort p) (sort q)
> :t sort sort :: [a] -> [Int]
The reason is that sort always returns the empty list, independently of the input list, so the type of the input list is not constrained.
On 29-03-2021 19:13, Henning Thielemann wrote:
On Mon, 29 Mar 2021, Antonio Regidor Garcia wrote:
Not bussiness oriented, but these two articles are pretty good at explaining what Haskell and similar languages have to offer:
This is brief and centered on Haskell's type system:
From slide 29 on he gives the example that type inference can point him to an infinite loop.
This would not work in Haskell, would it? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

El Mon, Mar 29, 2021 at 07:30:41PM +0200, Jaro Reinders escribió:
The reason is that sort always returns the empty list, independently of the input list, so the type of the input list is not constrained.
Actually, it only returns the empty list for the empty list. For other lists, it never returns.

https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... That might be sth you'd like to hide from the manager, but better prepared for himself to discover about. Years have passed though, I'm very curious how situations have changed according to SPJ's criteria.
On 2021-03-29, at 08:24, Clinton Mead
wrote: I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

XD XD XD It seems a sales talk about his STM monad, something like "Haskell is useless but Haskell+STM is in the good direction". So: Haskell 1.2 (stream-based IO): stateless, useless Haskell 1.3+ (monadic IO): statefull, but too coarse-grained, still useless Haskell 98/2010 + STM: more fine-grained statefullness, becoming usefull Best, Antonio El Mon, Mar 29, 2021 at 03:35:42PM +0800, YueCompl via Haskell-Cafe escribió:
https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask...
That might be sth you'd like to hide from the manager, but better prepared for himself to discover about.
Years have passed though, I'm very curious how situations have changed according to SPJ's criteria.
On 2021-03-29, at 08:24, Clinton Mead
wrote: I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

But AFAICT, STM composes poorly with other monads in today's mtl fashion, and by itself I don't think effects are tracked sufficiently well. I'm not aware of an idiomatic way to properly have STM in a monad stack, or is it there?
On 2021-03-29, at 16:12, Antonio Regidor Garcia
wrote: XD XD XD It seems a sales talk about his STM monad, something like "Haskell is useless but Haskell+STM is in the good direction". So:
Haskell 1.2 (stream-based IO): stateless, useless Haskell 1.3+ (monadic IO): statefull, but too coarse-grained, still useless Haskell 98/2010 + STM: more fine-grained statefullness, becoming usefull
Best,
Antonio
El Mon, Mar 29, 2021 at 03:35:42PM +0800, YueCompl via Haskell-Cafe escribió:
https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... <https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask...>
That might be sth you'd like to hide from the manager, but better prepared for himself to discover about.
Years have passed though, I'm very curious how situations have changed according to SPJ's criteria.
On 2021-03-29, at 08:24, Clinton Mead
wrote: I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

The STM is stateful (mutable state, thus impure) but it only changes the RAM, contrary to IO, that can change from the screen to missile launchers (so potentially much harmful). So the STM is deliberately separated from IO and similar monads. That's the point of using it. I don't have much experience combining it with non-IO monads, though. El Mon, Mar 29, 2021 at 07:11:49PM +0800, YueCompl escribió:
But AFAICT, STM composes poorly with other monads in today's mtl fashion, and by itself I don't think effects are tracked sufficiently well.
I'm not aware of an idiomatic way to properly have STM in a monad stack, or is it there?
On 2021-03-29, at 16:12, Antonio Regidor Garcia
wrote: XD XD XD It seems a sales talk about his STM monad, something like "Haskell is useless but Haskell+STM is in the good direction". So:
Haskell 1.2 (stream-based IO): stateless, useless Haskell 1.3+ (monadic IO): statefull, but too coarse-grained, still useless Haskell 98/2010 + STM: more fine-grained statefullness, becoming usefull
Best,
Antonio
El Mon, Mar 29, 2021 at 03:35:42PM +0800, YueCompl via Haskell-Cafe escribió:
https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... <https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask... https://www.reddit.com/r/programming/comments/25m291/simon_peyton_jones_hask...>
That might be sth you'd like to hide from the manager, but better prepared for himself to discover about.
Years have passed though, I'm very curious how situations have changed according to SPJ's criteria.
On 2021-03-29, at 08:24, Clinton Mead
wrote: I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Mon, Mar 29, 2021 at 07:11:49PM +0800, YueCompl via Haskell-Cafe wrote:
But AFAICT, STM composes poorly with other monads in today's mtl fashion, and by itself I don't think effects are tracked sufficiently well.
I'm not aware of an idiomatic way to properly have STM in a monad stack, or is it there?
STM is not a monad transformer, but it is a fine base monad, just like Identity, IO or ST. Here's a contrived example of (StateT Int STM Int): import Control.Concurrent.STM import Control.Monad (when) import Control.Monad.Trans.State.Strict import Control.Monad.Trans.Class (lift) -- main :: IO () main = do tv <- newTVarIO 0 y <- atomically $ flip evalStateT 0 $ do x <- get lift $ do modifyTVar tv (\a -> a + x + 1) y <- readTVar tv when (y > 10) retry return y print y So any or all of RWST work with STM, but you typically want to keep your STM transactions small and simple, so this is not a place where one would generally run wild with fancy stacks that do non-trivial additional computation. Indeed Monad Transformers are not Monads, they're always stacked on top of some base monad. The turtles don't go all the way down. A practical example of STM-like Monad's can be found in Hasql, where database operations run in a Monad that ensures that they have no side-effects that would prevent the transaction from being retried on deadlock detection. This is also a base Monad, where if you like you can stack more (pure) transformers. Which reminds me that ExceptT can be useful in such Monads, which avoid throwing impure exceptions. And is used in Hasql, where the operations tend to be more expensive than in STM, and any overhead from layering ExceptT or similar is quite small. -- Viktor.

Thanks for the insights, I was not aware of this approach before. But with STM as the base monad, I feel like to have lost the ability to delimit transaction boundaries at will, which is the essential tool STM offers. I can only think of doing that from IO via `atomically`, but that way we are dragged back to write transaction composing code in IO, so will lose effect tracking. I dunno but is there a way to delimit STM transactions without IO?
On 2021-03-29, at 19:50, Viktor Dukhovni
wrote: STM is not a monad transformer, but it is a fine base monad, just like Identity, IO or ST. Here's a contrived example of (StateT Int STM Int):
import Control.Concurrent.STM import Control.Monad (when) import Control.Monad.Trans.State.Strict import Control.Monad.Trans.Class (lift)
-- main :: IO () main = do tv <- newTVarIO 0 y <- atomically $ flip evalStateT 0 $ do x <- get lift $ do modifyTVar tv (\a -> a + x + 1) y <- readTVar tv when (y > 10) retry return y print y
So any or all of RWST work with STM, but you typically want to keep your STM transactions small and simple, so this is not a place where one would generally run wild with fancy stacks that do non-trivial additional computation.
Indeed Monad Transformers are not Monads, they're always stacked on top of some base monad. The turtles don't go all the way down.
A practical example of STM-like Monad's can be found in Hasql, where database operations run in a Monad that ensures that they have no side-effects that would prevent the transaction from being retried on deadlock detection. This is also a base Monad, where if you like you can stack more (pure) transformers.
Which reminds me that ExceptT can be useful in such Monads, which avoid throwing impure exceptions. And is used in Hasql, where the operations tend to be more expensive than in STM, and any overhead from layering ExceptT or similar is quite small.
-- Viktor. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

This talk from FP Complete's CEO is high-level (targeting management): https://www.youtube.com/watch?v=ybSBCVhVWs8 Cheers, Sylvain On 29/03/2021 02:24, Clinton Mead wrote:
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Hi Clinton,
I've been using Haskell (as well as Elm) in production for several years now, and have found that the language is very conducive to writing reliable and maintainable software while also fostering developer productivity.
Earlier this year, I wrote an article titled Why Haskell is our first choice for building production software systems: https://www.foxhound.systems/blog/why-haskell-for-production/. The article is written at someone like a software development manager, who knows how to program but doesn't necessarily know anything about Haskell. You may find that showing this article to your manager may help capture why you're raving about Haskell.
If you're interested, I also wrote an experience report about using Elm in production back in 2017, available here: https://charukiewi.cz/posts/elm/
Let me know if you have any questions. Always happy to help someone in your situation, since I think Haskell is a great language and many organizations can benefit from its strengths.
Best,
Christian
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, March 28th, 2021 at 19:24, Clinton Mead
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton

https://docs.google.com/presentation/d/1a4GvI0dbL8sfAlnTUwVxhq4_j-QiDlz02_t0... (probably more like explaining to you what you should say to management) On 2021-03-28 8:24 p.m., Clinton Mead wrote:
I’m looking for recommendations of videos/articles to show to a software development manager about why one should use Haskell, focused more from a benefits to business perspective.
Naturally this may involve some code, this manager isn’t completely clueless when it comes to programming languages, but basically something that explains why I’m raving about this “Haskell” thing all the time and why it’s a good idea.
Thanks, Clinton
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (12)
-
Albert Y. C. Lai
-
Antonio Regidor Garcia
-
Carter Schonwald
-
Christian Charukiewicz
-
Clinton Mead
-
Henning Thielemann
-
jack@jackkelly.name
-
Jaro Reinders
-
Sylvain Henry
-
Tom Ellis
-
Viktor Dukhovni
-
YueCompl