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 toThis may be a truth about some compiler (or many) but is not a truth
> constant variables whose values are data structures.
> I know LispWorksDefining 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
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 ofI'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.