I don’t have any examples right now, but the idea is great! The situation is a 
familiar one. I’m looking forward to what you find.

Cheers,
Max

> On 20 Jan 2016, at 16:08, Damien Cassou <[email protected]> wrote:
> 
> Hi,
> 
> I would like to study the impact of adding optional parameters to
> keyword methods in Pharo. The goal of optional parameters is to
> facilitate the implementation of methods where some parameters are
> optional. For example, Seaside has:
> 
> WAComponent>>request: aRequestString label: aLabelString
>             default: aDefaultString onAnswer: aBlock
> 
>    ...
> 
> This method of 4 arguments has only 1 required argument (aRequestString)
> and 3 optional ones. In the current implementation, this results in 7
> additional methods that only delegate directly or indirectly to the one
> above:
> 
> - request:
> - request:default:
> - request:default:onAnswer:
> - request:label:
> - request:label:default:
> - request:label:onAnswer:
> - request:onAnswer:
> 
> Before starting to implement anything, I need to know if it makes sense.
> If you want to help me, please send me all the use cases you have by
> giving me:
> 
> - the library name (and URL if not in Catalog), or "pharo" if it's in
>  Pharo
> - the class where this happens
> - the range of selectors that make sense
> 
> For the example above, this would be:
> 
> - Seaside
> - WAComponent
> - request:*
> 
> 
> Thank you very much
> 
> -- 
> Damien Cassou
> http://damiencassou.seasidehosting.st
> 
> "Success is the ability to go from one failure to another without
> losing enthusiasm." --Winston Churchill
> 


Reply via email to