Parameter lists in Boilerplater consist of an array of
Boilerplater::Variables, and sometimes an array of default values.
* @param capacity The number of elements that the Hash will be
* asked to hold initially.
public inert incremented Hash*
new(u32_t capacity = 0);
The first argument to any method is always "self", and is included as the
first element in the parameter list. Methods testing to see if their
signatures test as "equal" are strict about parameter lists:
- Variable names must match (important for parameter labeling).
- Variable types must match ("self" is a special case – it must pass an
inheritance test rather than match exactly).
- Initial values must match.
Put another way, method signatures in Boilerplater are defined not only by
types as in C, but also by variable names and default values. Once a method's
public interface has been published, it is not possible to change a parameter
name without breaking backwards compatibility or writing custom binding code
specifically to support the legacy interface.
Default values cannot be baked into C bindings, but they can for other
languages: Perl using labeled parameters and testing for undef, Java using
method signature overloading, etc.