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

Scopes as an alternative to setters? #69

Open
leithaus opened this issue Nov 6, 2023 · 0 comments
Open

Scopes as an alternative to setters? #69

leithaus opened this issue Nov 6, 2023 · 0 comments

Comments

@leithaus
Copy link

leithaus commented Nov 6, 2023

Have you tried a syntactic form for parameter scopes? Something like with( ){ … }. Here the scope-object contains all the fields that might be set with setters. Then one could provide some default scope objects and a syntax for describing them .

let in …

where is of the form
new( scope ) { : , … , : }
mod( ){ : , … , : }

It may be too verbose, but lexical scopes save a lot of confusion around where parameters get set.

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