lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On 12-Jan-07, at 10:23 AM, James Hearn wrote:

Can you give any examples of other programming languages that does
something similar? inject functions into other namespaces?

In Ruby all classes and modules are "open" meaning that other classes
are free to inject, patch, or otherwise modify their class
definitions. As a particular example Ruby on Rails adds functionality
to core classes like strings and numbers (!) It's definitely a
different approach than the standard in most other languages, but the
Ruby camp considers it a strength rather than a drawback.

This is also considered a strength of Smalltalk / Squeak and Objective-C, as I understand it.