The REALLY bad thing about Python lists ..

Michael Hudson mwh21 at cam.ac.uk
Sun May 14 19:48:34 EDT 2000


Gareth McCaughan <Gareth.McCaughan at pobox.com> writes:

> Michael Hudson wrote:
> 
> > (let ((result ()))
> >   (dotimes (i n)
> >     (rplacd (last result) (cons i nil))))
> > 
> > is O(n^2), yet people still manage to program in Common Lisp...
> 
> .. because they know that instead they can say
> 
>     (loop for i from 0 below n collect i)

Quite.  This *is* usenet, but does that really need to be said?

Cheers,
M.
(who vows never to leave anything implicit in a usenet posting ever
again)

-- 
93. When someone says "I want a programming language in which I
    need only say what I wish done," give him a lollipop.
     -- Alan Perlis, http://www.cs.yale.edu/~perlis-alan/quotes.html



More information about the Python-list mailing list