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

Choice of Short closure Symbol #6

Open
HallofFamer opened this issue Sep 11, 2018 · 1 comment
Open

Choice of Short closure Symbol #6

HallofFamer opened this issue Sep 11, 2018 · 1 comment

Comments

@HallofFamer
Copy link

I noticed that in your most recent macro, you are using ~> as the symbol for short closures. I am interested in the reason behind this choice. Is it for technically reasons, as it may be difficult or impossible to just use => as symbol? Or could it be that you are anticipating that PHP will be using ~> for its own short closure implementation in future, so it is an attempt to be consistent with the language itself? Just curious.

@assertchris
Copy link
Member

It's a combination of both. There was a lot of extra code to deal with edge-cases for =>, and one of the things I want to try and do with this library is ease folks into future PHP features (if the short-closures RFC ever lands).

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