<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Le 12/06/2012 15:27, Hemanth H.M a écrit :
    <blockquote
cite="mid:CAFfGx61cFfvZ1ckG9-8_aqikXaM8NV32oDi1eY7WbzPVxe6-0g@mail.gmail.com"
      type="cite">Would something like :
      <div class="markdown-here-wrapper" id="markdown-here-wrapper-2"
style="font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;color:rgb(51,51,51);background-color:rgb(255,255,255);border:none;line-height:1.5;text-align:left">
        <p style="margin:15px 0px"><code
            style="font-size:12px;font-family:'Bitstream Vera Sans
            Mono',Courier,monospace;margin:0px 2px;padding:0px
            5px;white-space:nowrap;border:1px solid
rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">obj["prop"]
            ||= "NewProp"</code> </p>
      </div>
      be useful? <br clear="all">
    </blockquote>
    ahah, I asked the same question very recently [1]. Answer by Brendan
    Eich [2].<br>
    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?<br>
    <br>
    David<br>
    <br>
    [1] <a class="moz-txt-link-freetext" href="https://twitter.com/DavidBruant/status/210654806732324864">https://twitter.com/DavidBruant/status/210654806732324864</a><br>
    [2] <a class="moz-txt-link-freetext" href="https://twitter.com/BrendanEich/status/210750515808706561">https://twitter.com/BrendanEich/status/210750515808706561</a><br>
  </body>
</html>