Skip to content

Conversation

@scolsen
Copy link
Contributor

@scolsen scolsen commented Oct 27, 2022

I wanted to better understand Carp's memory management system before diving in to fix some things, so I figured I'd write about it to enhance my own understanding. First off, however, I felt it might be nice to have a general, relatively approachable introduction to the general concepts behind a linear type system for newcomers to reference. Part of this was sparked by @eriksvedang's insightful comment that lifetimes have much to do with multiple scopes and moving values across different lexical bindings.

I've added some additional context to the doc in efforts to explain the
memory management system to users. After this, I'm going to write a bit
more about the actual implementation of the system as it stands
currently. One of the goals of this effort is to make it easier to
upgrade given an exhaustive account of its present workings.
The start of some additional introductory documentation on the memory
management system's key operations.
Describes the basics of copying references. More to come.
The memory doc now contains an approachable explanation of basic linear
type system concepts. I plan on extending this exploration with some
detailed explorations of the implementation.
@scolsen scolsen requested a review from a team October 27, 2022 00:56
Copy link
Member

@hellerve hellerve left a comment

Choose a reason for hiding this comment

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

This is amazing! Great work!

- Remove a comma.
- Mention registered types.
Copy link
Collaborator

@eriksvedang eriksvedang left a comment

Choose a reason for hiding this comment

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

Really well done! Great writing.

- Fix a typo
- Mention `ref`
- Describe that `typedef` defined types are automatically given delete
  implementations and managed by default.
@eriksvedang eriksvedang merged commit ce0601a into carp-lang:master Nov 1, 2022
scolsen added a commit to scolsen/Carp that referenced this pull request Nov 1, 2022
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.

4 participants