CSC/ECE 517 Fall 2007/wiki1b 1 c4: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
===Questions=== | ===Questions=== | ||
Is it possible to get unexpected behavior if one of the modules you are using is "enhanced" to contain a new method that happens to conflict with a name of an existing method? Is it possible to refer to these methods using a qualified name? Is it possible to use method aliasing to resolve the ambiguity? What approach does good o-o design dictate? | * Is it possible to get unexpected behavior if one of the modules you are using is "enhanced" to contain a new method that happens to conflict with a name of an existing method? | ||
* Is it possible to refer to these methods using a qualified name? | |||
* Is it possible to use method aliasing to resolve the ambiguity? | |||
* What approach does good o-o design dictate? |
Revision as of 04:04, 1 October 2007
Introduction
Problem
If multiple methods with the same name are defined, there needs to be some way of determining which method a call refers to. The general rule is given on p. 123 of Programming Ruby. But questions still remain.
Questions
- Is it possible to get unexpected behavior if one of the modules you are using is "enhanced" to contain a new method that happens to conflict with a name of an existing method?
- Is it possible to refer to these methods using a qualified name?
- Is it possible to use method aliasing to resolve the ambiguity?
- What approach does good o-o design dictate?