Skip to content

Instantly share code, notes, and snippets.

View jameshaydon's full-sized avatar

James Haydon jameshaydon

View GitHub Profile
@jameshaydon
jameshaydon / whynothaskell.md
Last active September 29, 2023 15:52
Why (some) Python programmers don't choose Haskell

Why Python and not Haskell?

This thread asks why more Python developers couldn't instead be using Haskell: https://discourse.haskell.org/t/commercial-haskell-should-go-after-python-julia-not-rust/6964/2

One of the points made in this thread, is that there is a sizeable class of Python programmers for which the trope "Python programmers will be scared of monads!" doesn't apply. I thought I would ask some of the people I know that use Python why they don't use Haskell.

Some notes about the demographic:

  • These people all work as academic researchers in Computer Science, formal methods, ranging from very abstract to quite practical.
  • Two of them know more about Category Theory and monads than the vast majority of Haskellers.
{-# LANGUAGE LiberalTypeSynonyms #-}
module ElimAgainAgain where
import Control.Applicative
import Control.Category
import Control.Lens hiding (cons)
import Data.Generics.Labels ()
import GHC.Generics
import Prelude hiding (either, head, id, tail, (.))
@jameshaydon
jameshaydon / ElimIntro2.hs
Created February 17, 2022 04:45
Eliminators and Introducers, again
{-# LANGUAGE TypeFamilies #-}
module ElimAgain where
import Control.Lens
import Data.Generics.Labels ()
import Data.Kind
import GHC.Generics
import Prelude hiding (either)
@jameshaydon
jameshaydon / IntroElim.hs
Last active February 16, 2022 07:08
Explicit intro and elim pattern
{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wno-partial-fields #-}
module Elim where
import Data.Kind
import Prelude
-- | A typeclass for introducing a type.