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

Switch to using uniform function call syntax #105

Open
Rohansi opened this issue Feb 27, 2023 · 0 comments
Open

Switch to using uniform function call syntax #105

Rohansi opened this issue Feb 27, 2023 · 0 comments

Comments

@Rohansi
Copy link
Owner

Rohansi commented Feb 27, 2023

Breaking change. A uniform function call syntax would implicitly compile code such as:

obj.something.method(1, 2)

into

const this = obj.something; // do not evaluate the left of the call two times
this.method(this, 1, 2); // inject 'this' value as the first argument

This would replace the current method of checking all field accesses in the runtime and, if returning a function, creating and returning a new closure with a bound 'this' value.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant