Without "extending" them?
Here's the problem:
Mark's TList type doesn't have a method to swap two links in the list. I'd like to add a method to do this. I do not want to change the source to max however because that would be bad and get overwritten, etc.
But I also have used the TList type throughought my code. If I were to make a new type using the Extends keyword to extend the list type, I'd have to go through all of my code and change it to use the new list type name instead, and I might miss some instances in one of my source files. Anyways I'd just rather not have to do this. It might be possible to do right now, but I'm thinking about a much bigger project what one might do in that case.
So the ideal thing would be to have the ability to add methods to a type without actually making a new type. Like, use the same type name elsewhere in the code, add additional fields, and methods, and functions to that, and they are magically included in the original type.
Cue people telling me that's not how OOP works and that convenience is the thing we sacrifice to the OOP god.
Here's the problem:
Mark's TList type doesn't have a method to swap two links in the list. I'd like to add a method to do this. I do not want to change the source to max however because that would be bad and get overwritten, etc.
But I also have used the TList type throughought my code. If I were to make a new type using the Extends keyword to extend the list type, I'd have to go through all of my code and change it to use the new list type name instead, and I might miss some instances in one of my source files. Anyways I'd just rather not have to do this. It might be possible to do right now, but I'm thinking about a much bigger project what one might do in that case.
So the ideal thing would be to have the ability to add methods to a type without actually making a new type. Like, use the same type name elsewhere in the code, add additional fields, and methods, and functions to that, and they are magically included in the original type.
Cue people telling me that's not how OOP works and that convenience is the thing we sacrifice to the OOP god.