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

More general use of who in definitions #408

Open
usaoc opened this issue Nov 20, 2023 · 3 comments
Open

More general use of who in definitions #408

usaoc opened this issue Nov 20, 2023 · 3 comments

Comments

@usaoc
Copy link
Collaborator

usaoc commented Nov 20, 2023

This is to record an initial thought about more general use of who (in the sense of define/who that binds a who syntax parameter to a defined name) in Rhombus. There seems to be many cases where existing Racket functions expect symbolic names, for example, in make-parameter (see racket/racket#4810). Maybe providing and encouraging the use of who will be a good idea? Ideas are welcome.

@usaoc
Copy link
Collaborator Author

usaoc commented Jan 2, 2024

I think a check-like macro (as used internally in Racket) can also be a good idea, and relates to who because both are inspired by Racket-internal macros.

@mflatt
Copy link
Member

mflatt commented Nov 21, 2024

Functions now support a ~who option.

I haven't found much need for a check-like macro, though, because argument annotations perform those checks.

@usaoc
Copy link
Collaborator Author

usaoc commented Nov 22, 2024

I guess ~who is still missing in def, but the usefulness of that is more doubtful than in fun and alike. For things like parameters, we may be better served with a separate definition form; for other things, we may not necessarily want to use the exact variable name for the debugging name (say, prompt tags). But I’ll leave this open just in case someone has more thoughts on the topic.

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

2 participants