3 ms·
> You can't replace an object with a new object while it's globally readable Sure you can. This is the whole point of smalltalk become: and common lisp CHANGE
by moonchild 4y ago
> You can't replace an object with a new object while it's globally readable
Sure you can. This is the whole point of smalltalk become: and common lisp CHANGE-CLASS.
- hinkley 4y agoThose change the type annotations for a memory location. Also if you tell me there are no concurrency gotchas for this then I’ll tell you that you have a single threaded interpreter or you’re lying. We are talking about retaining the type and swapping the pointers from an independent object to a set of offsets into a struct of arrays.
- moonchild 4y ago> if you tell me there are no concurrency gotchas for this then I’ll tell you that you have a single threaded interpreter or you’re lying You are making a big assumption. Neither common lisp nor smalltalk specify the semantics of concurrent programs, but it is certainly possible to implement such a feature without, as you say, concurrency gotchas. Perhaps a better example is concurrently compacting gcs for java.