Published: 14 December 2022
Tags: compiler, garnet, rust
Simon Heath discusses the problem with generics and how it relates to code reuse, in reference to implementation on the Garnet programming language.
- Although generic types aren't complicated to implement by themselves, the complexity comes up when you want to start reasoning about the relationships between types, including types you don't know about yet
- Modules trade off some power for simplicity
- The main practical difference between traits/typeclasses and modules is that with traits the compiler does more of the accounting work for you