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 :-)
In reply to Re^3: Can I add methods to an existing object?
by morgon
in thread Can I add methods to an existing object?
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |