Initial Commit
This commit is contained in:
706 files changed
+135430
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#! @file pointer.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the pointer trait, which the compiler gives every pointer type.
|
||||
|
||||
module core;
|
||||
|
||||
|
||||
#! A pointer, whatever it points at, however many pointers deep.
|
||||
#!
|
||||
#! A pointer is an address. It is compared, ordered, and hashed as one, starts
|
||||
#! as `null`, and moves by whole elements, so `p + 1` is the element after `p`,
|
||||
#! and two pointers subtract to the number of elements between them. Nothing of
|
||||
#! what it points at is reached through it: `*p`, `p[i]`, and `through(p)` reach
|
||||
#! that.
|
||||
#!
|
||||
#! A type parameter bounded by `pointer` has what pointers have, as `equatable`,
|
||||
#! `ordered`, and `zeroable` give, along with moving by an integer and
|
||||
#! subtracting. The compiler decides what is a pointer, so no type can implement
|
||||
#! it.
|
||||
pub trait pointer {}
|
||||
Reference in new issue
Block a user