Is there any reason an OO language couldn’t have a borrow checker? Sure, it would be wildly more complex to implement but I don’t see how it’s impossible.
OO languages typically use garbage collector. The main purpose of the borrow checker is to resolve the ambiguity of who is responsible for deallocating the data.
In GC languages, there’s usually no such ambiguity. The GC takes care of it.
Is there any reason an OO language couldn’t have a borrow checker? Sure, it would be wildly more complex to implement but I don’t see how it’s impossible.
OO languages typically use garbage collector. The main purpose of the borrow checker is to resolve the ambiguity of who is responsible for deallocating the data.
In GC languages, there’s usually no such ambiguity. The GC takes care of it.