I'm ok with examplar too. PS: From far it looks like a bikeshed discussion :)
Alex wrote:
I agree with Doru. Just checked the image and it seems that there is already quite a number of methods with <example> annotation that behave exactly >the same behaviour described by Doru. Yes - there are more for a simple reason: because Doru created them according to HIS OWN definition to solely return instances. And they come in as GT extension methods.
Would my opinion/points are more valid if we had more examples tagged <example> tags to mark all example methods?
So maybe we could continue having <example> to show how to create a valid instance of the class that have some value and can work? One benefit is that we could based on <example> show some usefull preview of the class in inspector. The point is that we could do this preview with <exampleInstance> or <exemplar> as well! We do not lose anything!
So with two different tags: - <example> for general examples - and <exemplar> <exampleInstance> for valid instances
we would catch TWO FLIES INSTEAD OF JUST ONE: we would not be dependent on exampleXXX selector naming to mark example methods as it is now also in Pharo 4 AND we could do the preview in the new GT tools!!!
Also with <exampleInstance> or <exemplar> we would also make it more clear that it returns an instance for a preview!
In non-technical terms this would be a WIN-WIN for Tudor and me ;)
Assume having a MultistateButtonMorph with <example> pragma. You can inspect MultistateButtonMorph (class) and will get as preview morph instance of the button. It is not that I do not understand this. I know that by providing instance examples this would also be a step forward on the GT/tools side.
I would not like to see only ONE step backward and only ONE forward when we can do TWO MOVES forward. Is this so hard to understand?
If Tudor agrees on either <examplar> <sample> or <exampleInstance> he will get a beer. Should I buy you a beer as well to convince you? ;)
Thx T.