Replies: 1 comment
-
I would like to add on this. I dislike how I constantly have to convert from the Num2Word::new(). This new() method should've been relieved to the Default trait impl instead of to I would suggest that Num2Words should be treated as a "driver" instead of a disposable struct since Num2Words weights 56 Bytes (not taking into account the space that might be needed from the heap for each instance of String it holds in preferences. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Now, users only get common Num2Words interface, which is simpler, but involves more operations, like string comparisons and Boxing. Many rustaceans will hate it.
Also, let's derive all common traits on Num2Words and (if public) languages, like PartialEq, Clone, Hash, to allow using them, say, in HashMaps.
Beta Was this translation helpful? Give feedback.
All reactions