On Thu, Dec 6, 2012 at 6:53 AM, Andreas Rossberg <[email protected]>wrote:
> On 6 December 2012 05:05, Rick Waldron <[email protected]> wrote: > > Again, I reject the notion that "someone might screw up" is a valid > argument > > for this, or any, discussion. It's one thing to be aware of the potential > > for misuse, but entirely another to succumb to "fear driven design". > > "Fear driven design" is pejorative. I'll own that, my apologies. > The argument really is about the > ability to do local reasoning as much as possible, which is a *very* > valid concern, especially when reading somebody else's code using > somebody else's library. > > I agree with other voices in this thread that in general, returning > 'this' rather is an anti pattern. The evidence I've brought to this discussion shows that the most widely used and depended upon libraries heavily favor the pattern. > You can get away with it if you > limit it to very few well-known library functions, We established a criteria for built-ins, I don't think we should be using "return this" by default, but indeed we should where it will be an expressive benefit. https://gist.github.com/4219024 > but I doubt that > blessing such style in the std lib does help that cause. > > /Andreas >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

