<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On 26-Feb-09, at 9:17 AM, David Mercer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div class="Section1"><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">On Wednesday, February 25, 2009 10:49 PM, Michael T. Richter wrote:<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom: 12.0pt;margin-left:.5in"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">I submit that even at the time of C++ garbage collection algorithms were more than suited to the task.  It was the old guard of programmers switching over to C++ from C that were the hurdle, not the technology.<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">I admit to being part of that old guard.  My view in the early ’90’s was that Lisp was the best language for development, so prototype in Lisp, and then convert to C for production.  (My sister had an alternative view which I accepted, which was to only convert the parts that were slow, and keep most of it in Lisp.  She had the luxury of working for an employer that permitted that approach.)<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">But anyway, I never really understood people’s problems with memory management; if you malloc memory, you need to be sure you understand the lifecycle of that memory and identify where it was to be freed.  I just didn’t understand how people could mess that up.  It made debugging code easier, too, since half the time I could find the problem by finding the malloc and figuring out where it went from there and where it wasn’t getting freed (or prematurely freed).</span></font></p></div></blockquote><div><br></div><div>You answered your own question. Eliminating explicit malloc/free eliminates that <span class="Apple-style-span" style="text-decoration: underline;">class</span> of error. Just as Erlang/FP paradigmatically eliminates whole other classes of error (such as mistakes in using explicit locks).</div><br><blockquote type="cite"><div class="Section1"><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy"><o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">Then when Java came along, it really proved my point about garbage collecting being slow, because Java was much slower than C or C++.</span></font></p></div></blockquote><div><br></div><div>Why blame gc alone? Java was <i>interpreted</i> (then)...</div><div><br></div><div>It may be that the overhead of VM and gc was also a factor in the failure of Smalltalk-80 to conquer the world. Of course, 95 times out of 100 performance just doesn't matter as much as the programmer thinks – that's one thing that has not changed – while maintainability almost always matters.</div><div><br></div><div>--Toby</div><br><blockquote type="cite"><div class="Section1"><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">  I steadfastly refused to learn Java, and luckily I was in a role where I could do that.  The irony here, though, is, as Richard alluded to, I was a big fan of Awk and (later) Perl, because I didn’t expect them to be efficient.  I wanted them to be easy to whip something up,...</span></font></p><p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10.0pt;font-family:Arial;color:navy">David<o:p></o:p></span></font></p> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">erlang-questions mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a></div> </blockquote></div><br></body></html>