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

syntax sugar for auto-named constants would be nice to have #3685

Open
yegor256 opened this issue Dec 17, 2024 · 3 comments
Open

syntax sugar for auto-named constants would be nice to have #3685

yegor256 opened this issue Dec 17, 2024 · 3 comments

Comments

@yegor256
Copy link
Member

Currently, I have to write this:

[] > foo
  n.as-number > num
  expensive > n!

It will be more convenient to have a special syntax for this:

[] > foo
  as-number. > num
    expensive >>!

Here, the object n will be auto-named. I don't need his name anyway, I only need num.

@yegor256
Copy link
Member Author

@maxonfjvipon WDYT?

@maxonfjvipon
Copy link
Member

@yegor256 maybe we could try to implement something like this:

[] > foo
  expensive!.as-number > num

It's equivalent to you proposal

@yegor256
Copy link
Member Author

@maxonfjvipon yes, looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants