While working with PureScript code, I often think of good topics for PureScript talks at meetups or conferences. I wanted to make an open thread here to collect them.
Structural vs nominal types – when to use which.
PureScript’s record types are structural types, but people often turn record into a nominal type by newtyping it to a name. This is desired to make that record an instance of a type class. When writing functions that work with that record, do you use its nominal type or its structural type?
There are trade-offs either way, and alternative ways of accomplishing those trade-offs. This would be a fun exploration for a talk.
3 Likes