Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea: Convenience accessor of aggregate objects, like let-hash in Gerbil #1049

Open
shirok opened this issue Jul 4, 2024 · 0 comments
Open

Comments

@shirok
Copy link
Owner

shirok commented 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.

@shirok 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant