
The Expression Problem in Go - signa11
https://eli.thegreenplace.net/2018/the-expression-problem-in-go/
======
wybiral
Why don't you define Expr to be:

type Expr interface { Eval() float64 }

Instead of that being an empty interface and ditch the "Eval" interface? Or
just require the structs to take instances of "Eval"? That way BinaryPlus
won't accept the string without being wrapped in a type with an Eval method?

------
saolof
Interestingly, Julia handles the type safety aspect with ease despite being
dynamic, since it has both multimethods and parametric polymorphism.

