[Esug-list] Nested Degenerate Convenience Methods

Damien Pollet damien.pollet at inria.fr
Wed Apr 1 18:31:49 EDT 2015


Hi Sean, I'm using "implicit default" or "implicit argument" for the chains of less and less terse methods that eventually call the fully-explicit canonic one. There is a related idiom where the explicit argument is a block, and the implicit version either results in a sentinel value or signals an exception, e.g. ifAbsent/ifNone. This one I call "default case handler".

In either case, I'm not convinced the name is that clear, so if you get by a nice one, I'm interested.


> On 01 Apr 2015, at 18:49, Sean P. DeNigris <sean at clipperadams.com> wrote:
> 
> Is there a name for the following pattern?
> 
> doSomething: arg1
>  ^ self doSomething: arg1 ifA: arg2Default
> 
> doSomething: arg1 ifA: arg2
>  ^ self doSomething: arg1 ifA: arg2 ifB: arg3Default
> 
> 
> 
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Nested-Degenerate-Convenience-Methods-tp4816719.html
> Sent from the ESUG mailing list archive at Nabble.com.
> 
> _______________________________________________
> Esug-list mailing list
> Esug-list at lists.esug.org
> http://lists.esug.org/mailman/listinfo/esug-list_lists.esug.org

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet







More information about the Esug-list mailing list