Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dwohnitmok
on Jan 27, 2021
|
parent
|
context
|
favorite
| on:
Python's Type Checking Renaissance
Yes the visitor pattern is a valid encoding of algebraic datatypes. Very heavyweight (imagine if booleans were all encoded with the visitor pattern) but nonetheless valid.
https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://blog.ploeh.dk/2018/06/25/visitor-as-a-sum-type/