Created
December 14, 2010 15:39
-
-
Save bowbow99/740588 to your computer and use it in GitHub Desktop.
xyzzy では structure の accessor で全く関係ない structure の slot に触れてしまうことに気づいた。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; xyzzy では structure の accessor で全く関係ない structure の slot に触れてしまう事に気づいた。 | |
| (defstruct foo | |
| bar baz) | |
| => #<structure-definition: foo> | |
| (defstruct hoge | |
| fuga piyo) | |
| => #<structure-definition: hoge> | |
| (hoge-fuga (make-foo :bar 3 :baz 4)) | |
| => 3 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
いちいちインスタンスをチェックするようにするとか、ついでに使われてない :type 使って型チェックもするとか、それほど難しくはないのだけど、速度的なトコが心配。
(declare (optimize ...))で省略できるようにすればいいんだろうけど、そうすると compile.l いぢることになるんで、そこまですんの?と。