[erlang-questions] The Beauty of Erlang Syntax

Toby Thain toby@REDACTED
Sat Feb 28 01:40:04 CET 2009

On 26-Feb-09, at 9:17 AM, David Mercer wrote:

> On Wednesday, February 25, 2009 10:49 PM, Michael T. Richter wrote:
> 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.
> 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.)
> 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).

You answered your own question. Eliminating explicit malloc/free  
eliminates that class of error. Just as Erlang/FP paradigmatically  
eliminates whole other classes of error (such as mistakes in using  
explicit locks).

> Then when Java came along, it really proved my point about garbage  
> collecting being slow, because Java was much slower than C or C++.

Why blame gc alone? Java was interpreted (then)...

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.


>   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,...
> David
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090227/40d2190b/attachment.htm>

More information about the erlang-questions mailing list