<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>WeakRef isn't great. Cleanup is delayed until local memory pressure exists. Not when resource obviously goes out of scope and could be cleaned up right away.<br><br> - Jay<br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Subject: Re: [M3devel] saving indentation?<br>From: dragisha@m3w.org<br>Date: Sun, 2 Sep 2012 10:25:34 +0200<br>CC: m3devel@elegosoft.com<br>To: jay.krell@cornell.edu<br><br>With C++ you don't have "big complicatched machinery" behind the scenes, serving clearly defined language. It's complicatchion is right in front of you.<div><br></div><div>You have big nasty complicated language in front of a programmer and in front of compiler implementor. For what? For fanciness of infix operator? </div><div><br></div><div>Garbage collection and WeakRef mechanism are bringing destructor-like functionality to any type you wish. To me, it is a lot more important than fancy infix.<br><div><br><div>
<span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-size:medium"><span class="ecxApple-style-span" style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><div>--</div><div>Divided by a common language</div><div><br></div><div>Dragiša Durić</div><div><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a></div><div><br></div></div></span><br class="ecxApple-interchange-newline"></span><br class="ecxApple-interchange-newline">
</div>
<br><div><div>On Sep 2, 2012, at 9:34 AM, Jay K wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;font-size:medium"><span class="ecxApple-style-span" style="font-family:Calibri;font-size:16px">There is more to my usual C++ pitch.<br>Some languages have garbage collection. So "pointers" don't need such "fanciness" as reference counting, "smart pointers". But instead there is a big complicatched machinery behind the scenes.<br>Similarly, some languages have "synchronized" or "lock". Here again, the syntax is approximately perfect and you can't fail to release a lock.<br><br><br>However these are both special purpose mechanisms, for memory and for locks.<br><br><br>What about closing files, network connections, database connections?<br>C++ does a good job of providing a general purpose mechanism, rather than having the compiler and runtime special-case two specific resources. Operator overloading fits here too. C, Java, Modula-3 special case a few types -- int, float, string, and provide some infix operators. No user-defined type is given this power. In C++, user-defined types and language-defined types have approximately equal powers.<br></span></span></blockquote></div><br></div></div></div>                                     </div></body>
</html>