[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OPEN-KEYWORDS



I don't mind keyword orthogonality being used as a simplicity metric in
the "(a)esthetics" section. I do feel unsure about the way in which it
is presupposed that keyword orthogonality is an explicit and uniform
design goal. I think the wording of the proposal should be reworked so
as not to take such a goal for granted. (:TEST and :TEST-NOT are obvious
counter-examples to this design principle.)

In principle, for this particular case, I don't see anything wrong with
the orthogonal meanings for :if-exists and :if-does-not-exist that Skona
is trying to push. As Moon says, this might be fine if we were doing
things over, but given that it's an incompatible change, we should
proceed carefully.

In particular, the behavior is already fully well-defined if you just
specify all keyword arguments explicitly. We're only haggling over how
the defaults work. My personal opinion is that if you care enough to
worry, you should write the keyword explicitly in your code just so it's
clear to your reader that this is an issue you considered.

For example, a lone :IF-EXISTS :OVERWRITE seems to presuppose the
existence of a file to overwrite. Ditto for :APPEND. The absence of that
file -might- be due to this being the first time the program was run,
but more often it is not. As such, signalling an error is not without
some motivation of its own. If the programmer wants to assert that
he's overwriting a file that might not exist, I think
 :IF-EXISTS :OVERWRITE :IF-DOES-NOT-EXIST :CREATE
is both reasonable and appropriate. In fact, I would advocate any programmer
write this even if the proposed change were adopted.

I do not think that it is the purpose of argument defaults to let you just
fail to specify their value when they are coincidentally what you would
have supplied. That is, I would sometimes suggest explicitly supplying the
same value as would be defaulted if that value is important to you and that
fact might be interesting to your reader.

I do think that The Purposes of argument defaults include:
 * to let one be deliberately vague about a particular feature.
   (I don't think the test case Skona is suggesting is a case where
    the programmer should be vague. Indeed, I think it is one where
    she has as much as said that the programmer wanted to get a
    specific, non-vague thing. To get it, the programmer has only
    to ask for it explicitly.)
 * to let one omit information that seems irrelevant, and yet to
   have something reasonable occur in the case where it turned out
   to be relevant.
   (In the case in question, if the user omitted the :IF-DOES-NOT-EXIST
    case, it seems likely that they didn't think this case through. I've
    discussed the consequences of this above, but I think the current
    interpretation is as good as the one being proposed. If they did
    think the case through, I believe that is tantamount to declaring
    it `relevant' and they should have explicitly specified the option.)

Given that the change neither extends the power of the language nor
encourages the programmer to write cleaner code (at least, by the metrics
I've stated above), I can't endorse it. If a stronger argument is advanced,
I will, of course, reconsider my position based on that argument.

In either case, I am happy to see it presented to the full committee
for a vote anyway if Skona wants it to (with some reworking of the
rationale and some -very- trimmed down version of this dissenting
commentary).