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

multiple: Make evaluation slightly less lazy and overhaul collect. #195

Merged
merged 3 commits into from
Feb 13, 2020

Conversation

DeedleFake
Copy link
Owner

@DeedleFake DeedleFake commented Feb 13, 2020

Expressions are now evaluated when they are stored. In other words, let expressions evaluate their right-hand side when they themselves are evaluated, and function arguments are evaluated before being passed. This means that functions implemented in Go shouldn't need to manually call arg.Call(frame) on every argument before using it. A weird side-effect of this is that extra arguments passed to a function are evaluated, even if the function doesn't actually use them.

Because of this, collect no longer makes sense as a standard library function, so that function has been removed and replaced with a new syntactic structure. If (| and |) are used to delineate a compound instead of just ( and ), that compound will return its scope when evaluated instead of the last expression's result.

@DeedleFake DeedleFake merged commit 0f78302 into master Feb 13, 2020
@DeedleFake DeedleFake deleted the dev/freezing branch February 13, 2020 21:43
@DeedleFake
Copy link
Owner Author

Accidentally part of #166.

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.

None yet

1 participant