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

Extend LambdaConstructor for more flexibility #1622

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

gbrail
Copy link
Collaborator

@gbrail gbrail commented Sep 12, 2024

This lets us create constructors that behave differently when invoked
using "new" than when called directly. The native "Date" class is an
example. The default behavior, which uses the same behavior in either
case but can automatically throw an exception if only one form is
supported, still works.

This lets us create constructors that behave differently when invoked
using "new" than when called directly. The native "Date" class is an
example. The default behavior, which uses the same behavior in either
case but can automatically throw an exception if only one form is
supported, still works.
@gbrail
Copy link
Collaborator Author

gbrail commented Sep 12, 2024

@p-bakker and @rbri I think that you had some questions about lambda constructors for the Proxy implementation. I tried to lambda-ize the Date class, and found that I needed the changes in this PR. Let me know if you find it useful.

@gbrail
Copy link
Collaborator Author

gbrail commented Sep 17, 2024

This doesn't break anything but I think it'll be useful in upcoming changes. If anyone has a chance to take a look, that'd be great, because I'd love to move forward with it.

@gbrail
Copy link
Collaborator Author

gbrail commented Sep 21, 2024

I really want people to use this so I'm merging it. Thanks!

@gbrail gbrail merged commit a84fbba into mozilla:master Sep 21, 2024
3 checks passed
@gbrail gbrail deleted the lambda-callable branch September 21, 2024 18:20
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

Successfully merging this pull request may close these issues.

1 participant