incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [jira] Updated: (LUCY-19) Boilerplater::ParamList
Date Tue, 18 Aug 2009 17:22:14 GMT


Marvin Humphrey updated LUCY-19:


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.

> Boilerplater::ParamList
> -----------------------
>                 Key: LUCY-19
>                 URL:
>             Project: Lucy
>          Issue Type: Sub-task
>          Components: Boilerplater
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>         Attachments: 301-param_list.t,, parser_add_param_list.diff
> Add support for function/method parameter lists to Boilerplater.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message