4 ms·
Messages and function calls are similar but interpreted at different times. In a OOP like Java the method is usually set at compilation. In Smalltalk or Objecti
by peter303 12y ago
Messages and function calls are similar but interpreted at different times. In a OOP like Java the method is usually set at compilation. In Smalltalk or ObjectiveC the method is interpreted when the program is run. A class may not even know the method and either ignore it or handle it. Delayed binding gives more flexibility in designing class and increases the chance of runtime errors. In the olden days delayed binding made programs slower and executables larger. But that isn't much of an issue now.