Subject: Re: Fast graphics on Lisp
From: Erik Naggum <erik@naggum.net>
Date: Fri, 19 Oct 2001 21:06:52 GMT
Newsgroups: comp.lang.lisp
Message-ID: <3212514409164194@naggum.net>

* ibpratibha@yahoo.com (Pratibha)
| I guess it's things like this that gives Lisp a bad name,

  Absolutely anything can be used to excuse Lisp's bad name.  In truth,
  _every_ language has this kind of gotcha.  Only Lisp gets a bad name
  because someone who are ignorant of them run into them.  If you want to
  look for the reason behind the "bad name", you need to look much closer
  to home than the language.

| I wonder if there is anything in optimizing compiler technology of the
| last decade [...] that can detect and do something about this sort of
| optimization opportunity.

  Well, it certainly doesseem that constant folding is not performed
  terribly often in Common Lisp compiler.  For everything we can do with
  the language, it is actually hard to know when an expression will always
  return the same value.

  For instance, (length foo) of a list foo _may_ change if any cons cell
  reachable from foo is changed, and it is hard to prove that that cannot
  occur.  However, calling a function repeatedly with the same argument
  that the _programmer_ does not think will change is not good style, and
  since Common Lisp is a language that implicitly trusts the programmer,
  philosophically quite distinct from most other language, if you do call
  the same function with the same argument repeatedly, you probably have a
  good reason to do so, and if you really did not mean to, you would not
  have done it to begin with.  This trust issue is important, because it
  also means Common Lisp programmers need to trust their Common Lisp system
  more than other language users need to trust theirs.  We also have the
  most trustworthy _standard_ in the whole industry, and most Common Lisp
  programmers are exceptionally conscientious, with few notable exceptions,
  and they are _actually_ programming in some other language, anyway.

  To a good Common Lisp programmer, a construction in your code that in any
  other language would be a common, boneheaded thing to do and _therefore_
  subject to optimization, not criticism, by a much smarter compiler than
  most of its programmers, would cause a Common Lisp programmer to ask why
  you did it, the Common Lisp compiler to actually do what you told it to
  do, and some wise guy to quip that (bad) Common Lisp programmers know the
  cost of nothing.  :)

///
-- 
  Norway is now run by a priest from the fundamentalist Christian People's
  Party, the fifth largest party representing one eighth of the electorate.