[parenscript-devel] [PATCH] Lisp-like initialization options for MAKE-ARRAY

Vladimir Sedach vsedach at gmail.com
Thu Nov 29 03:53:53 UTC 2012


Hi Boris,

Thank you for this patch, it is most excellent. Pushed to the repository.

Happy hacking,
Vladimir

On Tue, Nov 13, 2012 at 9:31 AM, Boris Smilga <boris.smilga at gmail.com> wrote:
> 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.
>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>




More information about the parenscript-devel mailing list