Continuation of Encoding Overlapping, Extensible Isomorphisms: encoding "open kinds" to better express some awkward type classes.
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
{-# LANGUAGE DeriveFunctor #-} | |
import Control.Applicative | |
import Control.Monad.Writer | |
import Control.Monad.Reader | |
import Control.Monad.Identity | |
import Data.Map (Map, (!)) | |
import qualified Data.Map as Map | |
import Data.List (groupBy, intercalate, nub) | |
import Data.Function (on) |
(* Frege to Russell to OCaml | |
* Gottlob Frege was a philosopher, logician, and mathematician who is | |
* widely credited as the father of analytic philoshophy. Around the | |
* turn of the century he wanted to put mathematics on a rigorous | |
* foundation. To do so, he invented a programming language called | |
* axiomatic predicate logic. The basic idea is that you can express | |
* set theory in this logic. Since much of math can be described in | |
* terms of set theory, it therefore could be expressed in axiomatic | |
* predicate logic. If this small core logic could be shown to |
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
- Seeing Like a State by James Scott
- Public Opinion by Walter Lippmann (Evan Czaplicki)
- A Pattern Language by Christopher Alexander (Brian Marick)
- Domain Driven Design by Eric Evans (Brian Marick)
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
Kris Nuttycombe asks:
I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?
I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.
I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.