[erlang-questions] The Beauty of Erlang Syntax

David Mercer dmercer@REDACTED
Thu Feb 26 15:17:57 CET 2009


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).

 

Then when Java came along, it really proved my point about garbage
collecting being slow, because Java was much slower than C or C++.  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, and if performance were
necessary, I'd write it in C.  My thought here was that if I wanted slow
garbage collection, I'd use a language easy to program in (e.g., Awk or
Perl); if I needed speed, I'd use C.  Java seemed neither easy to program in
nor fast (slower than Perl in some cases), so it just didn't seem to have a
place.  That being said, I did have people on my staff who would write Java
programs where a couple of lines of Perl would have worked, but I guess you
use the tools you know.  I didn't know Java, so I used other tools.

 

To this day, I still don't know Java and don't understand why I would learn
it.  I still don't see its place in my programming world, and every Java
program I have ever seen has not only been slow, but ugly to boot.  My
language of choice now, however, is Javascript.  Pull it out of the browser
(there are several nonbrowser environments for Javascript; if you have
Windows, one of them comes with your operating system) and it's really quite
a fun language.  I know it is not as fast as C or C++, and I can always
recode the parts that need tuning in a faster language, but I have not, as
yet, had to do that.  It's fast enough, and I distribute my system over
multiple machines if I need more speed.  That's how I discovered Erlang.

 

Cheers,

 

David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090226/19592abc/attachment.htm>


More information about the erlang-questions mailing list