Naming suggestions
Antoniotti Marco
antoniotti.marco at disco.unimib.it
Thu Feb 4 20:05:34 UTC 2016
On Feb 4, 2016, at 11:25 , Steve Haflich <shaflich at gmail.com<mailto:shaflich at gmail.com>> wrote:
<silly_question>
Does it work for plists? For alists?
</silly_question>
Yes it does because you are wrapping the plists and the alist.
Sorry for the pointy response :) But I had anticipated the question and yes, I presume that lists and plists will be wrapped as in
(<reference-operator> (plist <your plist>) 'indicator)
Otherwise you are getting into nasty syntax with intermingling of indexing and other parameters to discriminate the “view” of the data. In other words I want this signature
(function (object index1 &rest more indexes) (values t boolean))
with the caveat that an array could have a index1 of NIL to accommodate
(aref (make-array () :initial-element 42)).
Can the user write methods to add his own structures/classes/constructs to the set understood by REF?
More seriously, this function seems to me to be an over generalization, distorting CL style. Built into the numerous built-in ways of supporting data in CL are assumptions about the efficiency and scaling of the various kinds. Although efficiency might not matter for particular low-bandwidth operations, in other places it will certainly matter. That's obvious. But even more important is that use of an over-generalized reference operator makes the code harder to read and understand. If I see an aref, I know I'm looking at an array, understand something about the expected performance, and know what to look for elsewhere in a huge module to examine where this array is constructed and modified.
For me, traditional CL operators have a nice, time-tested balance between generality and specificity.
This are all very valid points, but they are not the issue :) I have not given any context, but the reference operator will not be a CL-level operator. I am re-doing stuff in a DSL built upon CL, where all the CL operators will be usable, but where the overall goal is to offer other users what they may be used to.
Cheers
—
MA
--
Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01
DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it
Viale Sarca 336
I-20126 Milan (MI) ITALY
Please check: http://cdac.lakecomoschool.org
Please note that I am not checking my Spam-box anymore.
Please do not forward this email without asking me first.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20160204/74fa2753/attachment.html>
More information about the pro
mailing list