Newsgroups: comp.lang.dylan,comp.lang.lisp,comp.lang.java
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!torn!watserv2.uwaterloo.ca!watserv3.uwaterloo.ca!undergrad.math.uwaterloo.ca!clgonsal
From: clgonsal@undergrad.math.uwaterloo.ca (Carl Laurence Gonsalves)
Subject: Re: Parenthesized syntax challenge
Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
Message-ID: <DGDGEB.6no@undergrad.math.uwaterloo.ca>
Date: Fri, 13 Oct 1995 05:25:23 GMT
References: <44aa9a$j5h@miso.cs.uq.edu.au> <453po8$175@Yost.com> <LUDEMANN.95Oct6140930@expernet26.expernet.com> <DGApp8.J41@undergrad.math.uwaterloo.ca>
Nntp-Posting-Host: cayley.uwaterloo.ca
Organization: University of Waterloo
Lines: 64
Xref: glinda.oz.cs.cmu.edu comp.lang.dylan:5397 comp.lang.lisp:19475 comp.lang.java:1436

In article <DGApp8.J41@undergrad.math.uwaterloo.ca>,
Carl Laurence Gonsalves <clgonsal@undergrad.math.uwaterloo.ca> wrote:
>In article <LUDEMANN.95Oct6140930@expernet26.expernet.com>,
>Peter Ludemann <ludemann@expernet.com> wrote:
>>
>>Because Java has garbage collection, no pointers, and somewhat more
>>sensible handling of strings and arrays than C++, it might start
>>whetting C programmers' appetitites for the things that programmers
>>who use high-level languages (Prolog, Lisp, Smalltalk, etc.) have long
>>taken for granted, but which the C programmers have either not
>>understood or have thought to be too inefficient.
>
>The incredible slowness of Java is only evidence of the inefficiency of
>garbage collection. I've programmed in a few languages that have garbage
>collection (among them are Scheme, Modula-3, and now Java), and all have
>been *much* slower than C or C++. I'm not saying Java is bad. Just don't
>call it "efficient" when it most certainly is not. It's fine for a lot of
>things, but it is unusable for anything computationally intensive. I have
>yet to hear of a person who has seen the "bouncing heads" demo run
>smoothly...
>
>I'm also not saying that garbage collection is the only reason Java is
>slow. The fact that it's interpreted and is continually doing range
>checking must slow it down too. But Java is not going to convince anyone
>(except maybe people used to really slow languages like Rexx or BASIC) that
>garbage collection is efficient.

Several people seem to have misunderstood my point, so I thought I'd better
clarify. I am *not* saying that garbage collection is slow. What I am
saying is that Java is slow. I think most people agree on this. Java also
has garbage collection. (any disagreements?)

Now, when I said "evidence" perhaps I was using the wrong word. By evidence
I mean that (statistically speaking) the fact that Java is both slow and
has GC puts a point in the "GC is slow" bucket. I'm not saying that it
proves that GC is slow, nor am I saying Java is slow *because* it has GC.
In fact, I recall reading that Java is about 8-times faster if you compile
it to native-code (rather than byte-code), and the majority of the
remianing slowness when compared to C has to do with security checks and
range-checking.

The post I was originally replying to was saying that one could convince C
and C++ programmers that GC could be efficient by pointing at Java. That's
a silly statement since Java programs are very slow, and if anything the
slowness of Java will make many C and C++ programmers feel that GC must be
the cause of Java's slowness.

As for Scheme and Modula-3, the Scheme I used was interpreted (I probably
should've pointed that out. By default I assume Scheme is interpreted, just
as by default I assume Rexx and BASIC are interpreted, while I assume C and
Pascal are compiled). The Modula-3 compiler I use is SRC Modula-3, which
from what I've seen must be generating some pretty bad code. (I haven't
used it in a couple of months, so things may have changed by now)

Anyways, before you go and send me another flame telling me GC is the best
thing since sliced bread, I suggest you go back and read my original post.
I never actually said there was anything wrong with GC, though I suppose
some might think that is what I was trying to imply.

-- 
        Carl Laurence Gonsalves - clgonsal@undergrad.math.uwaterloo.ca
                   Computer Science, University of Waterloo
               http://www.undergrad.math.uwaterloo.ca/~clgonsal/
                   http://www.csclub.uwaterloo.ca/~clgonsal/
