[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question on byte specifier format



>>> From: Neil Goldman <goldman@isi.edu>
>>> Date: Fri, 24 Jul 92 16:33:52 PDT
>>> To: tony@brc.uconn.edu
>>> Subject: Re: question on byte specifier format
>>> Cc: allegro-cl@ucbvax.berkeley.edu, goldman@isi.edu
>>>
>>> I believe your problem is missing quotes.  Try:
>>>
>>> (defmacro VARIABLE-NO-NEW-LANDMARKS-P (var)
>>>   `(ldb-test ',*NO-NEW-LANDMARKS* (variable-flags ,var)))
>>>
>>> (defmacro VARIABLE-DISCRETE-P (var)
>>>   `(ldb-test ',*DISCRETE* (variable-flags ,var)))
>>>
		:
		:
>>> objects (at least I don't think that is required).  Is there some
>>> reason why you don't just have:
>>>
>>> (defmacro VARIABLE-DISCRETE-P (var)
>>>   `(ldb-test *DISCRETE* (variable-flags ,var)))
>>>
>>> and let the COMPILER decide how to deal with the constant's value?
>>> That should certainly be portable.
>>>
>>> neil goldman

First, let me clarify why I made the original posting.  The code is publicly
available software posted in 1991 and was acquired via FTP from another site.
The main reason for the posting was to ask if the list-implementation of byte
specifiers is specific to ACL (but not necessarily exclusive to it).  In the
documentation that came with the system, a request is made to inform the
"original designers" (I assume) of any 'bug fixes' (via a "bugs@...." e-mail
address).  I wanted to know whether to inform them that the problem is with
ACL4.0 and to use the conditional 'allegro-v4.0' in the bug fix or that it
is with all implementations of ACL and to use simply 'allegro'.  I've
recieved other responses to my initial posting from people who recognized
the code and told me they had no problems compiling it AS IS under 3.xxx.
I didn't want to submit a 'bug fix' that contained a bug (i.e.  the wrong
conditional what would screw up people with other versions of ACL).

As to the problem itself, I added the quotes just after sending the original
posting to see what would happen and the compilation proceeded without any
problems.  As to why the constant is evaluated at macro expansion time, I
don't know.  You'd have to ask the original implementors of the code.  In
the past when dealing with FTP'ed code, when I'd make changes that one would
assume would make no difference, I've been caught by little "gotch'a"'s
specific to an implementation of LISP [this was before "standards"] and endded
up making a big difference (e.g.  the code maked an assumption somewhere that
I violated by making the change). Also, what looked useless in the code
sometimes turned out to be kludges to get around a bug or peculuairity to
the original implementation language.  Since at times it's hard to tell 
which is which, I'm always a little nervious making changes to systems about
which I know very little.  In addition, I like to keep FTP-acquired code as
close to the original so that I can implement any posted bug fixes easily.

-- Tony Guzzi