There needs to be some way of specify varargs in the new function API, but in a way that still lets us do some type checking of the arguments.
The old arg_count and last_captures_rest methods should be removed and replaced by specific methods:
- param or required_param for parameters that must be given
- optional_param for parameters that may be missing
- repeated_param for a parameter that may occur 0-many times of the given type
An optional_param may not be followed by a required_param, there may only be one repeated_param and it can only appear last.
Consequently, there should be a block_param method that is an alias for required_block_param
For Documentation: The language specification contains the description of the 4x function api in the file 'func-api.md'