Subject: Re: [Q]: Recursion help
From: Erik Naggum <>
Date: 2000/01/23
Newsgroups: comp.lang.lisp
Message-ID: <>

* Dirt <>
| So, it is safe to recommend to my professor that we should be taught
| to use '=' to compare numbers rather than 'eq'?

  your professor should never teach EQ in the first place.  EQ should be
  discovered by good students on their own.  novices should always use EQL
  for typeless object comparison, and try not to think about EQ.

  = signals an error for non-numbers.  this is often a major pain.  EQL
  yields false if the objects are of different types.  this can sometimes
  be exactly what you want.  = yields true for _numeric_ equality, which
  can sometimes be very expensive to compute, but is often worth the cost,
  except when you control the types of both objects and you would have to
  be a real klutz to introduce that cost wantonly.  therefore, EQL will
  tell you about suboptimal programming practices if it yields false on two
  numbers that appear "alike", and this fact alone will teach most students
  better programming practices.