[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More FORMAT
- To: Richard Berman <firstname.lastname@example.org>
- Subject: Re: More FORMAT
- From: Barry Margolin <barmar@Think.COM>
- Date: Tue, 19 May 87 19:07 EDT
- Cc: David A. Moon <Moon@stony-brook.scrc.symbolics.com>, email@example.com
- In-reply-to: <8705192222.AA05902@vaxa.isi.edu>
Date: Tue, 19 May 87 15:22:17 PDT
From: Richard Berman <firstname.lastname@example.org>
Thanks for the ref: on page 386. As for some implementations defaulting to
adjustable arrays, page 288 says, of the :adjustable keyword in make-array,
"...if specified and not nil, indicates that it must be possible to alter the
array's size dynamically after it is created. This argument defaults to nil."
Granted, this does not say that a value of nil prohibits adjustability, but
only that it must be adjustable if given non-nil. Do you interpret this as
meaning "nil value *may* indicate it is possible to alter ...."?
:adjustable T means "I plan on adjusting this array, so make sure it is
adjustable." :adjustable NIL means "I don't plan on adjusting this
array, so don't go out of your way to make it adjustable." The response
to the latter on some systems is, "oh, it's no trouble."
I hope there is a way to have guaranteed non-adjustable arrays!
Some systems (Maclisp, for example!) don't have non-adjustable arrays.
This is no different from the element type. If you specify
:element-type 'integer you are requiring Lisp to create an array that
can at least hold integers. It doesn't prohibit it from creating an
array that can hold other things, too.
The way to think of these things is as hints or declarations. Telling
the system that you only plan on storing integers or that you don't plan
on adjusting the array allows it to choose an optimal array format. If
a particular implementation chooses not to perform a particular
optimization it doesn't affect the semantics.