Subject: Re: Testing for function equality
From: Erik Naggum <>
Date: Sun, 02 Jun 2002 22:30:48 GMT
Newsgroups: comp.lang.lisp
Message-ID: <>

* "Matthew X. Economou"
| Using READ-DELIMITED-LIST won't accomplish this.

  Sigh.  Yes, it will.  (I really wonder why you ask for help when you
  reject the offers you get.  What is _wrong_ with people who ask for help
  in such a manner that only the single, specific question they ask may be
  answered?  If you got stuck, do you think it is because you made all your
  other choices as wisely and informedly as possible?  Of course not!  You
  are stuck _now_ because you made a critical error a _long_ time ago.  The
  ability to make yourself aware of the choices you have made is crucial to
  learn from experience.  Lack of such ability is goddamn annoying to those
  who watch you fumble and stumble through a wilderness of non-solutions
  instead of going straight for the right answer when given a hint.)

| Instead, I must modify the reader.

  You only think you must.  Please listen.

| The Common Lisp specification states that one cannot meaningfully copy
| the reader macro function of #\( because it is hard coded to look for #\)
| to terminate the list.

  Yes, it calls read-delimited-list with #\).  This is _really_ obvious.

| I would like to write a version of the left parenthesis reader macro
| function that can be meaningfully copied, provided one copies the reader
| macro function for #\) as well.

  This is the wrong approach.  How do you know which terminating delimiter
  you want to associate yourself with?  How do you communicate this?  Why
  are you so dead set against communicating it directly to the function
  that reads the delimited list?

| Using these functions in place of the standard reader macro functions
| allows one to meaningfully copy the syntax of #\( to a new list-opening
| character, provided one also copies the syntax of #\) to a corresponding
| new list-closing character.

  If you want to arrive at a solution, rather than your own preconceived
  solution, which you are now trying to force to work, it is no harder than
  to make a function that accepts two arguments, the delimiting characters,
  and sets up the reader for the former macro character to be a function
  that calls read-delimited-list with the latter character as terminator,
  and then copies #\) to the latter so a stray terminator will signal an

  I posted code only yesterday that used <> and () for lists.  Do you think
  I mucked around with writing my own read-delimited-list to get this
  effect?  No.  It is simple and straightforward with read-delimited list.

| I want a straight answer to the question: Can EQ test two functions for
| equality in conforming code code?  The specification pages for EQ and
| family don't say.  The above code depends on the answer being "Yes."

  You _want_ a straight answer?  Really?  Are you sure you understand how a
  voluntary forum works?  Why are you so inconsiderate?  How hard can it be
  to treat people who have expressed a desire to _help_ you nicely?

  Geez, the clueless newbies here are getting more arrogant by the minute.

  You can do the work to figure out the "straight answer" yourself.  The
  answer is right there in front of your pertinacious obstinateness.
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.

  70 percent of American adults do not understand the scientific process.