blblblbl
blblblbl
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
On a side note, should I make an issue in Github about this?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
Got you, thx! Probably it is a good idea to write in docs about aliases and the fact that lifetime not only manages value lifetime but also controls aliasing
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
So __lifetime_of(self) should already provide information to compiler that Reference(list[0]) is an Alias to list?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
So, should __getitem__ return something else more complex, that has reference to self?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
In my original question I used Reference(list[0]). __getitem__ of list returns a ref [__lifetime_of(self)] T, so I guess there is no room to have reference to self
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
But we have mutable reference to a value inside UnsafePointer inside a List. Should compiler understand that this reference is also an alias for List?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
What makes smth an Alias?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
Why should it prevent it? I haven't found anything about it in docs
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
Or maybe even more precise questions are: 1. Does this code has well defined behaviour? 2. If yes, how does this work? If not, then how safe is safe Reference?
29 replies
MModular
Created by blblblbl on 10/16/2024 in #questions
How do safe Reference and List work together?
But why doesn't it segfault?
29 replies