Many dynamic languages support the ability to extend existing classes by adding new methods to them. You may think of categories in Objective-C and Groovy, or open classes in Ruby.
This is generally implemented by providing meta-classes. When some piece of code adds a method
foo
to, say, SomeClass
, then all instances of SomeClass
get that new foo
method. While very
convenient, such an open system may lead to well-known conflicts between the added methods.
Golo provides a more limited but explicit way to add methods to existing classes in the form of class augmentations.