> 
> > interface foo {
> >   function formatUseCases(...$options); }
> > - Advantage: No dependency on a class / object
> > - Disadvantage: doesn't document what options are available, no
> > default parameters
> >
> 
> 
> This is totally not a use case for variadic functions. The arguments of a
> variadic function are indexed, not named. In addition, they have the same
> type (or at least they are treated the same way).
> 

Right I'm for variadic '...$options' as proposed with indexed arguments (just 
like c). Python calls this positional arguments.

I'm stretching the comparison to see if syntax could be augmented to serve 
another use case (with named arguments)?

...$options[] would be more similar to  **keyparam in python:
http://rosettacode.org/wiki/Named_Arguments#Python

Reply via email to