forked from cairo-book/cairo-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# Understanding Cairo's linear type system | ||
# Understanding Cairo's Ownership system | ||
|
||
Cairo is a language built around a linear type system that allows us to | ||
statically ensure that in every Cairo program, a value is used exactly once. | ||
This linear type system helps preventing runtime errors by ensuring that operations that could cause such errors, such as writing twice to a memory cell, are detected at compile time. | ||
This is achieved by implementing an ownership system | ||
and forbidding copying and dropping values by default. In this chapter, we’ll | ||
talk about Cairo's ownership system as well as references and snapshots. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters