... because using method is old school and pragma's are new school ;) (Java
annotations anyone)
Arguably using pragma's is cleaner approach to specify orthogonal concerns but
without full IDE support (refactorings etc to minimize unmaintained pragma's) I
would argue for just using a method and package based on convention.
At the end of the day both solutions will work but if we are going to aggregate
all the MethodFinder acceptable selectors into a class method then we may as
well drop the pragma...
On 24 Jun 2011, at 3:41 PM, Stéphane Ducasse wrote:
Yes
we were wondering with igor why using pragmas and that a simple list would be
enough.
Stef
On Jun 24, 2011, at 2:26 PM, Alexandre Bergel wrote:
> Why not something like
>
> Magnitude class>>finderApprovedMethods
> ^ {#max: . #min: . #min:max: . #< . ... }
>
> It is shorter and less magic is involved here. It will also be probably
> faster to do a query.
>
> Cheers,
> Alexandre
>
> On 24 Jun 2011, at 05:25, Damien Cassou wrote:
>
>> Currently MethodFinder uses a list of acceptable selectors to execute.
>> This list of selectors is not maintained which results in a lot of
>> selectors to exist only in this list as they have been removed in the
>> system. I propose to use pragmas on classes to generate this list
>> automatically.
>>
>> Here is an example
>>
>> Magnitude class>>finderApprovedMethods
>> <finderApproveInstanceMethod: #max:>
>> <finderApproveInstanceMethod: #min:>
>> <finderApproveInstanceMethod: #min:max:>
>> <finderApproveInstanceMethod: #< >
>> <finderApproveInstanceMethod: #<= >
>> <finderApproveInstanceMethod: #< >
>> <finderApproveInstanceMethod: #<= >
>> <finderApproveInstanceMethod: #between:and: >
>>
>> What do you think?
>>
>> --
>> Damien Cassou
>> http://damiencassou.seasidehosting.st
>>
>> "Lambdas are relegated to relative obscurity until Java makes them
>> popular by not having them." James Iry
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>