lua-users home
lua-l archive

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


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.

James