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

issue DEFSTRUCT-CONSTRUCTOR-KEY-MIXTURE



    Date: Sat, 12 Aug 89 16:16:53 MDT
    From: sandra%defun@cs.utah.edu (Sandra J Loosemore)

Apparently no one has responded to this?

    Issue DEFSTRUCT-CONSTRUCTOR-KEY-MIXTURE says:

      Additional arguments that do not correspond to slot names but
      are merely present to supply values used in subsequent initialization 
      computations are allowed.

    Can the variables in the BOA constructor lambda list that *do*
    correspond to slot names be referenced in subsequent initialization
    forms as well?  If CLtL says anything about this, I can't find it.

I would assume that the "BOA" constructor lambda list is the same as
any other lambda list in having sequential binding semantics, so that
those variables can be referenced.  I don't claim to have any special
knowledge of or interest in defstruct constructors, though.

    I assume that this does not change the requirement on CLtL p. 309 that
    the default-init forms specified in the slot descriptors (as opposed
    to initialization forms appearing in the BOA constructor lambda list)
    are evaluated in the lexical environment of the DEFSTRUCT form?

I don't see how it could change it, since the writeup for that issue
doesn't say anything about lexical environments.

Editorial note upon re-reading the issue: the sentence 

  Keyword arguments default
  in a manner similar to that of &OPTIONAL arguments: if no default
  is supplied in the lambda-list then the slot initform is used;
  otherwise the slot is not initialized -- its initial value is
  undefined.

is partially bogus.  The portion following the semicolon comes from a
misreading of CLtL, confusing the description of &AUX with the
description of &OPTIONAL, and should be replaced with

  otherwise the default in the lambda-list is used.

X3J13 couldn't possibly have consciously voted for what this says, as it
is nonsense.  I don't know where to look in the current draft
specification, which in any case I do not have a copy of, for the
corresponding text to see if this mistake got into our draft.