[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Packages: where is the beef ?
According to my simple minded intuition, packages are name scopes in which I can
define what ever symbols I want to without having conflicts.
Unfortunately, is is NOT true in Common Lisp (at least not in Allegro
I have faced this problem several times in the past, but today when
I upgraded to version 4.1 (from 4.0.1) noticed new flavors in this
First I tried to make my own structure named 'assert' in my own private
package. That caused problems because of the new package locking scheme.
After RTFM I found that I must set 'excl:*enable-package-loking-errors*'
to nil. Fine. I understand that internal behaviour of defstruct may play
with other packages too, but isn't that little bit too compilicated to the poor
programmer ? It is programmers concern to bother ?
Next error message is:
Error: validate-metaclass-change forbids changing the class of
#<standard-class class @ #x4298be> to
#<standard-class structure-class @ #x41fa66>
[condition type: program-error]
I don't (yet) know how to work around this. I guess the lisp does
no like the idea of having a structure named 'class' even in my own
So, if we accept that we can't use any names in our own
packages, how can we know:
- what "reserved" names there will be in future releases of
Lisp, so that porting of our application to new versions of Lisp
is possible ?
- what new kind of checking rules the next versions of Lisp
will invent ?
I seriously consider of dropping out packages by using a renaming scheme:
% This article represents my personal views.
% Kari Systa, Tampere Univ. Technology, Box 553, 33101 Tampere, Finland
% work: +358 31 162585 fax: +358 31 162913 home: +358 31 177412
% Internet: firstname.lastname@example.org X.400: C=fi ADMD=fumail O=TUT OU=CS S=ks