Fork me on GitHub
#other-languages
<
2017-12-01
>
borkdude11:12:57

What did Rich Hickey mean with “types are parochial”? What does parochial mean in that context? I’m not a native speaker, but even looking it up in a dictionary doesn’t fully explain it to me.

borkdude11:12:54

What I think he means: types force you to choose a name for a combination of attributes and attributes from different types don’t merge

borkdude11:12:01

so the type “governs” the set of attributes?

borkdude14:12:41

Pragmatic “app” monad in Haskell :thinking_face:

newtype AppM a = AppM (LoggingT (ReaderT Context (ExceptT AppError IO)) a)
    deriving ( Functor, Applicative, Monad, MonadIO
             , MonadError AppError, MonadReader Context, MonadLogger)
https://savanni.luminescent-dreams.com/page/haskell-app-monad

tbaldridge15:12:55

@borkdude that's my interpretation as well.

borkdude15:12:21

I read the tweet also recently, but didn’t fully grok it

borkdude15:12:55

but I recognize the feeling of “this would never be a problem in Clojure” when working with typed languages 😉

seancorfield18:12:11

@borkdude Not sure if it helps but Rich means "parochial" in terms of "narrow scope or outlook" and I took it to mean that types are usually very focused and restrictive, so code is less reusable across domains -- compared to dynamically typed code that can operate on many different concrete types.

seancorfield18:12:01

Specifically, when you define a class type to represent a data structure, you end up with a set of operations on that class type -- that cannot be used on similar data structures that have a different type. Whereas we have operations on "collections" and "sequences" because we use data instead of specific types of data.

seancorfield18:12:41

I'd never thought of types that way until I heard Rich say it -- it was sort of a light bulb moment for me (which his talks often are).