is it: type Gender = String; or trait Gender { ?
-
-
Replying to @steveklabnik
the important difference is that traits can't be implemented dynamically, so only code authors can define a new Gender impl
2 replies 0 retweets 6 likes -
Replying to @withoutboats @steveklabnik
Maybe you can get a little dynamism this way: struct Person { gender: Box<Gender> } The important thing is no monomorphization.
1 reply 0 retweets 3 likes -
Replying to @wycats @steveklabnik
Users still can't *define* new Gender impls unless they are code authors. Dynamic dispatch allows delaying *selection* to runtime.
3 replies 0 retweets 4 likes -
Replying to @withoutboats @steveklabnik
I need to introduce you to unsafe code
1 reply 0 retweets 0 likes
I'm kidding of course
6:02 AM - 12 Jul 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.