-
Notifications
You must be signed in to change notification settings - Fork 574
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
Core Lib Documentation: box
module
#6651
Conversation
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: Mathieu <[email protected]>
Co-authored-by: Mathieu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @TAdev0)
corelib/src/box.cairo
line 5 at r2 (raw file):
//! `Box<T>` provides a way to store a value of type `T` in Cairo VM's _boxed_ segment, //! leaving only a pointer in the execution segment. This allows for: //!
This is information about the platform - not the language - shouldn't be the main point of the doc IMO.
(can exist, as a note, not as the main thing)
Code quote:
//! A smart pointer type that stores its value in a dedicated memory segment.
//!
//! `Box<T>` provides a way to store a value of type `T` in Cairo VM's _boxed_ segment,
//! leaving only a pointer in the execution segment. This allows for:
//!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @orizi)
corelib/src/box.cairo
line 5 at r2 (raw file):
Previously, orizi wrote…
This is information about the platform - not the language - shouldn't be the main point of the doc IMO.
(can exist, as a note, not as the main thing)
How would you want to see this exactly? I think it's important and thus should not be left out of the documentation (like notes on the memory layouts for Dicts, Arrays, etc).
It's true that now with Cairo Native this is not necessarily true 🤔. Any format you would prefer for these notes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @enitrat)
corelib/src/box.cairo
line 5 at r2 (raw file):
Previously, enitrat (Mathieu) wrote…
How would you want to see this exactly? I think it's important and thus should not be left out of the documentation (like notes on the memory layouts for Dicts, Arrays, etc).
It's true that now with Cairo Native this is not necessarily true 🤔. Any format you would prefer for these notes?
As i said - should be as a note in the documentation - but not the top of the definition.
so should probably be at the end, and include the word "note".
I'm really not convinced this is important note for developers, as they should know how to use it (interface) and why to use it (makes moving a value around much cheaper) - knowing how this is actually cheaper under the hood shouldn't be as interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @enitrat)
corelib/src/box.cairo
line 5 at r2 (raw file):
Previously, orizi wrote…
As i said - should be as a note in the documentation - but not the top of the definition.
so should probably be at the end, and include the word "note".
I'm really not convinced this is important note for developers, as they should know how to use it (interface) and why to use it (makes moving a value around much cheaper) - knowing how this is actually cheaper under the hood shouldn't be as interesting.
same thing should be true for array and for dict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @orizi)
corelib/src/box.cairo
line 5 at r2 (raw file):
Previously, orizi wrote…
same thing should be true for array and for dict.
I see, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @TAdev0)
corelib/src/box.cairo
line 130 at r3 (raw file):
} } // NOTE: A `Box<T>` is a smart pointer type that provides a way to store a value of type `T` in
this can be at the bottom of the top doc IMO.
@orizi updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @TAdev0)
No description provided.