<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Chris. :-)<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">"Initializing twice" is something we've accepted as an acceptable trade-off for nice code since 2006, when we changed Behavior>>#new to call #initialize.  </span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Hmm... disagree. Slightly. I like that #new calls #initialize. Yet, it can always be a smell that can be corrected via "super new" or "self basicNew myCustomInitialize". There are several examples in the image of custom initializers that get called explicitely after #basicNew. Though, I prefer the #basicNew+#myCustomInitialize over "super new".</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 05.09.2019 23:52:39 schrieb Chris Muller <asqueaker@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr">On Thu, Sep 5, 2019 at 3:43 PM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>IMO, no.</div><div>We don't want to have an empty Matrix by default, it's useless 99% of time.</div></div></blockquote><div><br></div><div>But that's exactly what this commit is about -- having "Matrix new" return a well-formed (empty) Matrix.  Isn't it what we're talking about?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>So it means initializing twice for nothing 99% of time.</div></div></blockquote><div><br></div><div>"Initializing twice" is something we've accepted as an acceptable trade-off for nice code since 2006, when we changed Behavior>>#new to call #initialize.  </div><div><br></div><div>Via Array empty, we're talking about three measly variable assignments.  Maybe it's just me, but that's light enough to prefer the nicer code.</div><div><br></div><div> - Chris</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>That's exactly where I would put basicNew... </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 5 sept. 2019 à 22:35, Chris Muller <<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>C'mon guys, it's neither!</div><div><br></div><div>"Different super call" is a classic smell picked up by Lint, and I agree with Tim about "basicNew" -- is an unnecessary use of a low-level method.</div><div><br></div><div>So why not simply the same conventional Smalltalky way, overriding #initialize like everywhere else?</div><div><br></div><div>  initialize</div><div>       super initialize.</div><div>       self rows: 0 columns: 0 contents: Array empty</div><div><br></div><div>And, done..?  </div><div><br></div><div> - Chris</div><div><br></div><div dir="ltr">On Wed, Sep 4, 2019 at 3:38 PM tim Rowledge <<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 2019-09-04, at 12:58 PM, Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de" target="_blank">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br>
> <br>
> Thank you :)<br>
> <br>
> A very minor question: Would you favor [self basicNew] over [super new]? It will work completely equivalently, but what is the better style?<br>
<br>
^super new<br>
<br>
`self basicNew` will not always work equivalently. And I can almost guarantee it will always do the wrong thing just when you feel sure it is doing the right thing. And you will suffer Debugging Hell.<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Why use one word when two polysyllabic agglomerates will do?<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div></div>
<br>
</blockquote></div></div>
<br>
</blockquote></div></div>
</div></blockquote>
                                        </div></body>