Re:Alan Kay on the Meaning of “Object-Oriented Programming” ...
by vidarh on Monday March 18, 2019 @07:01AM
(#19420092)
Ruby works like that, and it works just fine, unless you're dealing with developers that are intentionally trying to mess with your head.
The reality is that most of the time when the world is dynamically changing, there are reasons for it.
E.g. the typical Ruby example is an ORM where the methods available reflects the database schema of the database you just connected to. Whether you get an exception because the method you expected doesn't exist, or get an exception because some generated method got an error from the database doesn't matter: You need to deal with it either way.
All that changes in practice is the name of the error condition you need to handle.
The reality is that most of the time when the world is dynamically changing, there are reasons for it.
E.g. the typical Ruby example is an ORM where the methods available reflects the database schema of the database you just connected to. Whether you get an exception because the method you expected doesn't exist, or get an exception because some generated method got an error from the database doesn't matter: You need to deal with it either way.
All that changes in practice is the name of the error condition you need to handle.