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

Setters' semantics are illogical: they don't get the value #45

Open
progval opened this issue Jul 4, 2014 · 0 comments
Open

Setters' semantics are illogical: they don't get the value #45

progval opened this issue Jul 4, 2014 · 0 comments

Comments

@progval
Copy link
Contributor

progval commented Jul 4, 2014

When using a setter (eg. {[] 'foo': {#getter undefined, #setter (func (a, b) { b })}}['foo' = 'bar']), b is not 'bar' as expected, but is an object.

The setter has no way to know what the “assigned” value is.
Indeed, looking at this code: https://github.com/brownplt/LambdaS5/blob/master/src/ljs/ljs_eval.ml#L272, the value to be “assigned” is stored in v_value, but this variable is only used for Data fields, and never for Accessor ones…

@progval progval changed the title Setters' semantic is illogical: they don't get the value Setters' semantics are illogical: they don't get the value Jul 4, 2014
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

1 participant