3 ms·
I'm not sure I understand your example, do you want a string of FirstNames? Did you mean something like: class FirstName extends String {...}
by kjeetgill 7y ago
I'm not sure I understand your example, do you want a string of FirstNames? Did you mean something like:
class FirstName extends String {...}
- lolive 7y agoSomething like semantic-aware String, yes. (with syntactic sugar to avoid me repetitive tasks, plus the ability to uplift an existing code using String to its typesafe version in the most straightforwatrd manner). Something like the generics system but for String. I of course can uplift my String into Objects. But it is unneeded for 90% of the String usages. Plus it forces you to unbox the String from its Object to pass it to a function that consumes just a String.