Git Product home page Git Product logo

architecture.builder-protocol's People

Contributors

lovrolu avatar scymtym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

lovrolu

architecture.builder-protocol's Issues

Hard to understand documentation string of cardinality-case.

According to the documentation string of cardinality-case, the first element
of a clause is a "cardinality designator". A cardinality designator can be
(:map KEY-VAR), and then it says that KEY-VAR is bound to KEY in
some other cardinality designator shown as (:map KEY). But it does
not make much sense for a cardinality designator to bind a variable
for another cardinality designator. Perhaps the latter was supposed to be
a cardinality rather than a cardinality designator? But in that case, should
it not be (:map . KEY) rather than (:map KEY)?

Improve comment for make-keyword-arguments

I would add two things to the comment associated with make-keyword-arguments.

The first thing is that the list returned is initially (:key1 nil :key2 nil ...) so that the
first value of each list appears only after the first call to the destructive function.

The second thing is that, when a list of values is exhausted, then subsequent
calls to the destructive function will insert NIL, as opposed to (say) signaling
some error.

Starting ASDF system definitions by (in-package #:asdf-user)

By starting an ASDF system definition file with (in-package #:asdf-user), you gain
two advantages. First, programming tools will be informed that this is the right
package to use in order to interpret the file contents. Second, if the ASDF file
is not in a place where ASDF can find it, the programmer can then use LOAD
to load it, without updating the places ASDF is looking. This last point is
especially useful when there are two versions of the system in the system, for
instance one in Quicklisp to be used for "production" and one that is used for
development or experiments.

Definition of relation-slot? looks very strange.

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.

Hard to parse phrase in the documentation string of add-relations.

I can not parse the entry for (:map . KEY) in the documentation string for
add-relations. It says that RIGHT is a sequence of nodes, but then
it mentions keys in the sequence, so there seem to be some keys in
that sequence as well as nodes.

By the way, the preposition to use for "associated" is "with", and not "to".

In make-keyword-argument, handle base cases first

The use of previous-cell and previous-updater as Boolean values, has the
undesirable effect of handling the base cases after the "induction steps".
Since it is best to handle base cases first, i.e., in the "then" branch of the
IF, I recommend using (null previous-cell) and (null previous-updater) instead
and reversing the "then" and "else" branches. It would improve the code in
two ways. First, the base cases would be handled first, and second, it
would be clear that these variables are not Booleans, so that NIL is not
a false value, but a default value.

Iterative version of make-keyword-arguments

I might have written make-keyword-arguments like this:

(defun make-keyword-arguments (multi-keyword-arguments)
(loop for (keyword values) on multi-keyword-arguments by #'cddr
collect keyword into result
collect nil into result
collect values into values-list
finally (return (values result
(lambda ()
(loop for rest on (cdr result) by #'cddr
for values on values-list
do (setf (car rest) (pop (car values)))))))))
It has fewer lexical variables and its control structure is simpler.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.