Re: Re: .. cascade operator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Re: .. cascade operator

Man Hoang

This operator should have been added years ago. It would enable many APIs to return more appropriate results instead of `this`.

 

For example, `Set.prototype.add(value)` could return a boolean indicating if an item was actually added instead of `this`.

 


_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Re: .. cascade operator

Luan Nico
I agree with this, Dart has the exact thing and it's amazing. Not sure what's the status or reason for not following through, though.

On Wed, Oct 10, 2018 at 3:54 AM Man Hoang <[hidden email]> wrote:

This operator should have been added years ago. It would enable many APIs to return more appropriate results instead of `this`.

 

For example, `Set.prototype.add(value)` could return a boolean indicating if an item was actually added instead of `this`.

 

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss