3 ms·
That's nice but it seems you're in search of a nominal type system within a structurally typed language. I'd posit that it's usually much better to step and try
by culi 2y ago
That's nice but it seems you're in search of a nominal type system within a structurally typed language. I'd posit that it's usually much better to step and try to approach the problem from the way the language lends itself to be solved rather than trying to hack it to fit your expectations
- mattstir 2y agoDo you mind elaborating on why this approach would be bad in general? It avoids the overhead of creating new classes and wrapping your objects when all you care about is the type-safety that the class would provide. How would you "approach the problem from the way the language lends itself to be solved"?