| ▲ | Twey 3 hours ago | |
> The reason for this is that in Rust, a struct couples type-checking to a fixed data representation. You can't get one without the other. > Clojure decouples data representations from type checking. This is funny to me because seen from the other side, (this) Clojure couples runtime type information to data structures: you're no longer allowed to define a data structure that doesn't have some runtime type information attached. A fixed static structure is just the consequence of not adding dynamic type information. Meanwhile in Rust you can get type-checking ‘without’ a fixed structure by using trait objects. | ||
| ▲ | stephenlf 2 hours ago | parent [-] | |
Yeah that example was pretty flimsy and contrived. | ||