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

LET-CONST support should be added #3

Open
milesrout opened this issue Sep 27, 2016 · 0 comments
Open

LET-CONST support should be added #3

milesrout opened this issue Sep 27, 2016 · 0 comments

Comments

@milesrout
Copy link
Owner

milesrout commented Sep 27, 2016

Support for LET-CONST in the form of a syntactic form:

(let-const ((<var> <expr>) ...) . <exprs>)

The only difference between let-const and let should be let-const should create environments with ConstCells instead of Cells, and ConstCells should not be able to be mutated through SET! (or anything else).

{ 'a': Cell(nil) }      + { 'a': Cell(Symbol('a')) }      = { 'a': Cell(nil) } # current behaviour
{ 'a': ConstCell(nil) } + { 'a': Cell(Symbol('a')) }      = ... # ?
{ 'a': Cell(nil) }      + { 'a': ConstCell(Symbol('a')) } = ... # ?
{ 'a': ConstCell(nil) } + { 'a': ConstCell(Symbol('a')) } = { 'a': ConstCell(nil) } # obvious
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant