From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
2- Then you'd need to pass that object to a chunk of code which uses
=C2=A0 =C2=A0`type-of` and then checks the result for that primitive type.<= br> =C2=A0 =C2=A0Otherwise, the type you set would behave just like any other =C2=A0 =C2=A0non-primitive type so the "bug" would be harmless an= yway.
3- Furthermore, you'd need this object to be manipulated exclusively in=
=C2=A0 =C2=A0a way which also works with your record object without signali= ng an
=C2=A0 =C2=A0error (e.g. if the primitive type used is `integer`, it means = your
=C2=A0 =C2=A0object should never be passed to the likes of `+` since otherw= ise the
=C2=A0 =C2=A0bug would already be discovered by `+` without any need for yo= ur extra
=C2=A0 =C2=A0check).
I haven't seen any evidence that step 1 will ever occur, even by accide= nt.
No idea how likely is step 2.=C2=A0 `type-of` is very rarely used (except v= ia
cl-defmethod) so it's fairly unlikely, but possible.
Step 3 seems again very unlikely in itself, and even more so if step
2 occurred: if you checked with type-of that your object is of type
`integer` there's a very high likelihood that you're going to then = use
operations which only work on integers.
Will all 3 steps ever occur at the same time?
Do we really want to make every call to `make-record` pay the extra test
in order to hope to catch this hypothetical case?