On Tue, Nov 17, 2015 at 1:13 PM, Jeremy Darling
<[email protected]> wrote:
> Just as an aside, I think padLeft/padRight should still be added in addition
> to padStart/padEnd.  There are times (token generation, identity padding,
> etc) where you would want to specify the handedness of the pad operation and
> ignore the locale.  This goes for the trim* methods as well.

I disagree with what has been decided. :p

I was in favor of {trim,pad}{Right,Left}().  The reason: Iterators.

As JS moves forward toward people creating iterators to traverse an
object, referring to the start and end of something *can* be
ambiguous.  There is no confusion with *Left() or *Right().

I had assumed Start/End were chosen because it would be another move
to avoid very generic names.  Like how we have Array::some() instead
of Array::any(), and Array::every() instead of Array::all().
Less-generic names allows people to monkey-patch without obvious
collisions.  I am a fan of adding to String instead of making my own
XString.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to