in reply to Re^2: Can I add methods to an existing object?
in thread Can I add methods to an existing object?
Your approach declares the bubba-method at compile-time, my example at run-time.
You could not use your approach e.g. in a context where the name of the method to be added in not known at compile-time (e.g. is entered by the user).
And "hubba" and "bubba" are my just my personal preference for generic names that I use where others may use "foo" and "bar" that others prefer - I can't remember where I got that from initially but it has nothing to do with bubble gum :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can I add methods to an existing object?
by mr_mischief (Monsignor) on Apr 03, 2009 at 14:14 UTC |