3 ms·
In most languages that support this sort of things, can't you use SafeString in places where String is expected, as long as you declare SafeString as a sort of
by Symmetry 15y ago
In most languages that support this sort of things, can't you use SafeString in places where String is expected, as long as you declare SafeString as a sort of String?
- prodigal_erik 15y agoI wouldn't want SafeString is-a String, I would want a conversion from SafeString to String that removes whatever encoding or escaping was applied. Otherwise you end up re-encoding values that unbeknownst to you don't need it, which is why there are thousands of terrible PHP bulletin boards out there which won't let you use quotes without mangling them.
- mseebach 15y agoIn Java, String is a final class.