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

Class/Structs and Box<T> #3

Open
arekbal opened this issue Aug 14, 2019 · 0 comments
Open

Class/Structs and Box<T> #3

arekbal opened this issue Aug 14, 2019 · 0 comments

Comments

@arekbal
Copy link
Owner

arekbal commented Aug 14, 2019

SList<T> (for example) is a struct (opposite to class List<T>).
It leads to specific changes in how it behaves. 'Assign' conceptually means 'move' for this structs. Memberwise copy could harm developer.
So, ideally these should be passed by ref.
If user wants it to behave like a plain-old object, it has to wrapped in Box.

Consider making assignment [Obsolete] and enable operations MoveOut (negative length and checks everywhere?), MoveIn ctor.

It would be nice to document this stuff in example and docs.

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

No branches or pull requests

1 participant