Hi,
That is what I said. We need a meta-object that describes a Pragma instance. I said that we already had the need to have such a meta-object in Spotter and we created one that is called PragmaType. We can call it PramgaDescription as well, but the key point would be to casually connect the meta object and the instances.
For example, besides the description, you still would like to know which parts of the image actually react to such a pragma, and this is where getting an idea of the logic that is making use of a pragma is very useful. For example, in the case of the debuggerCompleteToSender pragma, we have:
- 15 annotations of methods
- 2 methods that use the pragma
So, you have 2 places to look for to understand that logic. You would not see this from a description only. Having a real meta-object allows us to complement a possible description with smarter analyses.
Cheers,
Doru
On Jun 26, 2016, at 2:29 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
I am not sure to get it. Why not simply having a class PragmaDescription that simply associate a comment to a selector ?
Alexandre
On Jun 25, 2016, at 3:18 AM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I believe we are missing a first class entity for a PragmaType. Essentially, I think that the class side of the Pragma class should become a full object.
In fact, we already have a rudimentary version of this in Spotter because we needed an object to be able to browse all definitions of a certain pragma.
So, now, I extended it with the concept of a user which is the list of all senders minus the methods that are annotated with a pragma. This helps distinguish the meaning of a pragma by looking at the code where it is being used. Perhaps we can find a better name than users.
You can see these users in the inspector and in spotter:
<pragma-type-users.png>
I think we should build on this.
What do you think?
Cheers,
Doru
On Jun 24, 2016, at 3:54 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
A pragma may be very obscure. For example, I do:
Pragma allInstances anyOne
=> <debuggerCompleteToSender>
If I want to know more about this <debuggerCompleteToSender> is actually quite challenging.
I see many methods having that pragma, but not idea what it is for.
I see that Halt>>signalerContext and Process>>complete: that use that pragma somehow. But still, I have no idea when I should use that pragma in my method.
What about having a way to comment pragma? Maybe something like
-=-=-=-=-=-=
Object subclass: #Pragma
instanceVariableNames: 'method keyword arguments comment'
-=-=-=-=-=-=
And a simple way to annotate pragmas?
Just an idea.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
--
www.tudorgirba.com
www.feenk.com
"What we can governs what we wish."
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
--
www.tudorgirba.comwww.feenk.com
"Problem solving efficiency grows with the abstractness level of problem understanding."