Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: 1999/03/30
Subject: Re: Constants and DEFCONSTANT
pe...@harlequin.co.uk (Pekka P. Pirinen) writes:
> Kent M Pitman <pit...@world.std.com> writes: No, the problem is you don't know what the compiler will inline, so you > > If you inline a constant (another thing defconstant is for) and you > > inline operations on the constant (another thing defconstant is > > for), then you get in a place where the identity of the subparts > > isn't tagged and the bookkeeping is hard. > Then don't do that. Surely if DEFCONSTANT is supposed to preserve can't know what to "not do". Further, a useful property of programs is that if you attach a name I'm not concerned with the use of Lisp as an implementation language for > That's not hard: The compiler _doesn't_ constant-fold over references to This may be a truth about some compiler (or many) but is not a truth > constant variables whose values are data structures. about Lisp. > I know LispWorks Defining that 60 compilers do it this way would be meaningless unless > works like that. Steven M. Haflich indicated (in the "`fast' global > variables" thread) that ACL "only dereferences constants like numbers > and symbols". Is there any implementation except MCL who don't get it > right? you can convince me that there is a reason to do it this way. I don't see the conceptual basis for saying it has to be done this way. > In any case, implementing constant identity is exactly the kind of I'm missing what language feature you're saying DEFCONSTANT breaks. > thing that should be left to compiler writers, the language should > just offer a way to declare a constant. I must say that if it was the > intention of the committee to let DEFCONSTANT break a basic language > feature like that, the standard should have included a clear warning. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||