On 10/2/12 4:09 AM, Walter Bright wrote:
On 10/1/2012 7:22 PM, Steven Schveighoffer wrote:
Does it make sense for Phobos to provide such a shortcut in an obscure
header somewhere? Like std.cstring? Or should we just say "roll your own
if you need it"?

As a matter of principle, I really don't like gobs of Phobos functions
that are literally one liners. Phobos should not become a mile wide but
inch deep library of trivia. It should consist of non-trivial, useful,
and relatively deep functions.

Well there are some possible reasons. Clearly useful functionality that's nontrivial deserves being abstracted in a function. On the other hand, even a short function is valuable if frequent enough and deserving of a name. We have e.g. s.strip even though it's equivalent to s.stripLeft.stripRight.

Andrei

Reply via email to