-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I just read your intersting blog post and stumbled upon the plural s logic in your example.
I think there is a general problem and an easy solution:
- not all languages have a plural
s, e.g. the German plural ofmeterismeter. - even in the English language there are irregular words. The plural of
footisfeetand the plural ofCelsiusisCelsius:-)
In other words the FooUnit traits should have a singular_name() and plural_name() method. Also the return type could be changed to &'static str to reflect the fact that it is a constant and avoid the heap allocation of String.
Metadata
Metadata
Assignees
Labels
No labels