FSET uses 'lookup', also abbreviated to @.
On 5 February 2016 at 08:35, Vsevolod Dyomkin vseloved@gmail.com wrote:
In rutilsx I have called generic access operator ? - see here: https://github.com/vseloved/rutils/blob/master/contrib/generic.lisp It allows the accessor code to stand up a bit, which I consider a good property. It is also chainable.
Here's an example usage (totals, weights and timestamps here are hash-tables of hash-tables):
(defmethod update1 ((model avg-perceptron) f class val) (with-slots (step timestamps weights totals) model (incf (? totals class f) (* (- step (? timestamps class f)) (? weights class f))) (incf (? weights class f) val) (setf (? timestamps class f) step)))
AT also seems a decent choice
Vsevolod Dyomkin +38-096-111-41-56 skype, twitter: vseloved
On Thu, Feb 4, 2016 at 8:03 PM, Antoniotti Marco < antoniotti.marco@disco.unimib.it> wrote:
Dear all,
in the quest for RESTHBDB) RE-doing Stuff That Has Been Done Before) I am trying to come up with a name for a referencing/dereferencing operator.
Think of something like
(<name-of-reference-operator> #2A((1 0) (0 1)) 0 0) ==> 1
of
(<name-of-reference-operator> #H((foo . bar) (we . 42)) ‘foo) ==> BAR ; I am cheating. #H(..) is a hash table.
SETF methods will be defined as expected.
Now. What could be a good name? I have the following list.
REF REF$ [] [[]] AT @ GETAT
What do you think? (Full disclosure: I usually refrain from taking up non alphabetic names)
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.