-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Definition of relation-slot? looks very strange. #11
Comments
Would writing the body as (and (not (null (c2mop:slot-definition-initargs slot)))
(not (null (slot-type->cardinality (c2mop:slot-definition-type slot))))) make the function easier to understand? The function is used as a predicate, is named like a predicate and would, when changed like that, also behave like a predicate. |
Not much. It looks to me like there ought to be a name for the case where the In other words, I think it is confusing to overload a function with a I know that there are plenty of standard functions that do this, and I also know that a library such a Clostrum contains many cases of NIL Then, if the universal builder is not a good idea, it doesn't matter |
The definition of relation-slot? looks very strange.
A minor issue is that the Scheme convention for
predicates is used. But the major strangeness is
that the function is presumably a predicate, but then
it returns the value of a call to slot-type->cardinality,
which presumably returns a cardinality which does
not look like a Boolean value. So this definition is
not understandable by itself and forces the reader to
understand the details of a different function. A
cardinality is usually a number, but this library also
defines a relation-cardinality, which is also not a
Boolean value.
The text was updated successfully, but these errors were encountered: