On Tue, Jun 12, 2012 at 10:33 AM, David Bruant <bruan...@gmail.com> wrote:
> Le 12/06/2012 15:27, Hemanth H.M a écrit : > > Would something like : > > obj["prop"] ||= "NewProp" > be useful? > > There is currently a strawman proposal for the "Default Operator", which can be found here: http://wiki.ecmascript.org/doku.php?id=strawman:default_operator Rick > ahah, I asked the same question very recently [1]. Answer by Brendan > Eich [2]. > I definitely agree that default arguments are a decent alternative. I > can't recall examples where it wouldn't be enough. Do you have use cases > where you would use ||= and default argument values couldn't be used? > > David > > [1] https://twitter.com/DavidBruant/status/210654806732324864 > [2] https://twitter.com/BrendanEich/status/210750515808706561 > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss