You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gerbil has (let-hash hash body ...), where, inside a body, a reader macro .x is read as (hash-ref hash 'x). It looks convenient to quickly accses multiple parts of the given aggregate.
We can make it generic by using universal accessor.
CL's with-slots is similar, but you explicitly binds the "variables" (in fact, it is an identifier macro). It doesn't need to introduce a new reader macro, neither an implicit varriable reference, which is a plus. But Gerbil's way can be more concise.
The text was updated successfully, but these errors were encountered:
shirok
changed the title
Convenience accessor of aggregate objects, like let-hash in Gerbil
idea: Convenience accessor of aggregate objects, like let-hash in Gerbil
Jul 4, 2024
Gerbil has
(let-hash hash body ...)
, where, inside a body, a reader macro.x
is read as(hash-ref hash 'x)
. It looks convenient to quickly accses multiple parts of the given aggregate.https://gerbil.scheme.org/reference/std/sugar.html#let-hash
We can make it generic by using universal accessor.
CL's
with-slots
is similar, but you explicitly binds the "variables" (in fact, it is an identifier macro). It doesn't need to introduce a new reader macro, neither an implicit varriable reference, which is a plus. But Gerbil's way can be more concise.The text was updated successfully, but these errors were encountered: