Issue 4426 in pharo: MethodFinder should use pragmas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4426 in pharo: MethodFinder should use pragmas

pharo
Status: Accepted
Owner: [hidden email]
CC: marianopeck,  [hidden email]
Labels: Type-Cleanup Milestone-1.4

New issue 4426 by [hidden email]: MethodFinder should use pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

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 methods to generate this list automatically.

I can do it but want to be sure that it's the correct way to do it before.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo
Updates:
        Cc: [hidden email]

Comment #1 on issue 4426 by marianopeck: MethodFinder should use pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #2 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

How about aggregating all these pragmas on a class side method, example:
ClassName>>#methodFinderPragmas
<MethodFinder: #ClassName selector: #sel1>
<MethodFinder: #ClassName selector: #sel2>
<MethodFinder: #ClassName selector: #sel3>

In this way there is less noise of these pragmas in actual source but at  
least we can find them for each class easily.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #3 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

It would already improve the situation I agree. However, they would still  
have to be maintained separately.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #4 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

In this case, I think the net effect is the same as when a new selector be  
introduced in a class, it would have to be marked by the pragma anyway, and  
this also will have to be "maintained".

Or do I understand incompletely the proposal and the template for a new  
method would include the pragma for inclusion and the converse will be  
true, i.e., when the programmer *does not want* it to be included the  
pragma would need to be removed?



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #5 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

ClassName>>#methodFinderPragmas
<MethodFinder: #ClassName selector: #sel1>
<MethodFinder: #ClassName selector: #sel2>
<MethodFinder: #ClassName selector: #sel3>

we could have
   <methodFinderOkSelector: #sel>
   because we know the class

but we have also to check that the finder can find class methods so  
probably having
<MethodFinder: #ClassName selector: #sel1> is better.

In anycase it would be good to build a little case and try.





_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #6 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

Do you all think it's better to put the pragmas within a single method in a  
class?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo

Comment #7 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

I think what would be ideal is to as was suggested and 'annotate' a method  
with a pragma, so that this annotation has the same lifetime of the method  
definition. This could be done from a class side method to aggregate the  
definitions and more importantly to not clutter the actual method code.

To me this implies tools to manage these annotations so that for example  
refactorings will take into consideration the current annotations and ask  
user if the annotations should still apply (example renaming a method).

Another possibility is to just change the browser to pull out pragmas (ala  
pretty print style) from the method so that it does not clutter the source  
(but in actual fact the pragmas are still in the method body). In that way  
developers are free of potentially many orthogonal definitions that the  
pragmas introduce. They can just read the plain old method or they can look  
in a code pane tab that is specific to the orthogonal concerns which the  
pragmas define.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo
Updates:
        Cc: [hidden email]

Comment #8 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

Please find attached my initial proposal. It works fine as far as I can  
tell.

Attachments:
        MethodFinder_should_use_pragmas.1.cs  12.3 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4426 in pharo: MethodFinder should use pragmas

pharo
Updates:
        Status: WontFix

Comment #9 on issue 4426 by [hidden email]: MethodFinder should use  
pragmas
http://code.google.com/p/pharo/issues/detail?id=4426

It looks like there is no interesting solution around and people do not  
seem to care much. We may want to reopen when it is possible to add pragmas  
to the methods without cluttering them too much.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker