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

spec: prepare for variables and parameters #47

Merged
merged 7 commits into from
Oct 8, 2024

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Sep 26, 2024

Summary

  • subdivide expressions into l-value and r-value expressions
  • add definitions for values, locations, and cells
  • introduce the notion of linear, affine, and normal types

Details

Some definitions and terminology was missing to be able to describe /
specify the semantics of variables and assignments. This commit aims to
extend the specification with the necessary parts.

As a preparation for future resource management, linear and affine
types are introduced already, though they're not of practical relevance
yet.


Notes For Reviewers

  • I made this a separate PR from locals, so that discussion (if any) can focus on the terminology
  • merging this can wait until lang: If expression support #46 is merged

Overall, I'm not too happy with the current specification. I think it's not formal enough, and the way it's currently structured is also off. It'll need a redo, eventually.

Summary
=======

* subdivide expressions into l-value and r-value expressions
* add definitions for values, locations, and cells
* introduce the notion of linear, affine, and normal types

Details
=======

Some definitions and terminology was missing to be able to describe /
specify the semantics of variables and assignments. This commit aims to
extend the specification with the necessary bits.

As a preparation for future resource management, linear and affine
types are introduced already, though they're not of practical relevance
yet.
@zerbina zerbina added the documentation Improvements or additions to documentation label Sep 26, 2024
spec/spec.md Outdated Show resolved Hide resolved
spec/spec.md Outdated Show resolved Hide resolved
"object" is also not ideal, but it's a bit better than "value" and
should do for now.
@zerbina
Copy link
Collaborator Author

zerbina commented Sep 27, 2024

@saem: I've replaced the relevant mentions of value with object, which resulted in a small improvement in overall clarity of the affected sections, I believe, though it's still not ideal.

object needs to be replaced with something else at some point, but I agree with you that it's a serviceable term for now.

Copy link
Contributor

@saem saem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, it's easier to follow after the change.

@zerbina zerbina mentioned this pull request Oct 7, 2024
13 tasks
@zerbina zerbina merged commit c7948f4 into nim-works:main Oct 8, 2024
5 checks passed
@zerbina zerbina deleted the spec-prepare-for-locals branch October 11, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants