Method Rename/Overload Control

Overview:

Provide the ability to rename methods when overloading allowing method name conflict resolution and overload control. This allows easier covarient parameter types.

Proposed by:

Jeff Walker (language designer)

Experts to Contact:

jwalker@cs.oberlin.edu

Status: Accepted into v0.6 (Prior to 2007-03-15)

Status Rational:

Reason:

Effiel and C# demonstrate the use of these features in multiple inheritance situations. Though interfaces greatly relieve this situation there may still be problems due to difference in semantic meaning. It also provides a way to indicate that a method has a more appropriate name when applied to some subclass.

Description:

Following the close parentheses of the parameter list and before the return arrow a colon and the method name or names to be overridden would be placed. If the name was ambiguous, as when it exists in multiple interfaces then the name may be qualified by some super or interface type. If a name is ambiguous and not qualified then the method overrides all methods of the same name with the appropriate signature. For multiple methods the names would be listed separated by commas.

Example:

A better example than this is still being sought.

module
{ public interface RAContainer
{ public abstract insert(Object data) -> void
public abstract remove() -> Object
}

public class Stack ::RAContainer
{ public push(Object data) :insert -> void {...}
public pop() :remove -> Object {...}
}
}


jwalker@cs.oberlin.edu