[parenscript-devel] [PATCH] Lisp-like initialization options for MAKE-ARRAY
Boris Smilga
boris.smilga at gmail.com
Tue Nov 13 17:31:29 UTC 2012
Good day.
Please find attached a patch to make Parenscript's MAKE-ARRAY accept a
single dimension argument, plus at most one of the keyword arguments
INITIAL-CONTENTS or :INITIAL-ELEMENT (plus, optionally, an :ELEMENT-TYPE,
which is silently ignored). For reverse compatiblity, any sequence of
arguments to MAKE-ARRAY which does not fit the above convention, shall be
treated the same as before, that is, formatted as arguments to new Array().
The rationale for the changes is to improve interoperability between PS and
Lisp proper. At present, initializing array elements to anything other
than the default value (which, in Lisp, is implementation-dependent)
requires writing a user-side loop over the array.
A couple of unit tests are included in the patch.
Yours,
— B. Smilga.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20121113/f8578b06/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Lisp-like-initialization-options-for-MAKE-ARRAY.patch
Type: application/octet-stream
Size: 2738 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20121113/f8578b06/attachment.obj>
More information about the parenscript-devel
mailing list