3 ms·
One reason to abstract away strings is that you can gain security. For example, your template might only accept an HTMLString, which can only be created from a
by zeroonetwothree 14y ago
One reason to abstract away strings is that you can gain security. For example, your template might only accept an HTMLString, which can only be created from a String by escaping. Your database library might only accept a QueryEscapedString, and so on.
Of course all of this is possible without creating a wrapper for vanilla strings.