well⦠I do agree now is a bit late to change things. We failed to understand the different purposes of âexampleâ and âgtExampleâ at the beginning, so now we are more or less paying the consequences of that miss-spot. In any case, as any non-critical stuff, it can wait until Pharo 5 to be solved. Esteban
On 26 Mar 2015, at 14:30, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,
I/we do not want to impose anything on anyone.
<gtExample> was introduced a long time (more than 1 year) ago in GT/Moose. It is used both for documentation purposes and for generic stress tests for the Inspector and Spotter (and let's not even count that the concept offers an alternative to SUnit testing that we will pursue in the near future). It got integrated in Pharo and then renamed to <example> 6 months ago (in October) after a public discussion on this mailing list. It later got mixed with the example* selectors as part of #isExampleMethod and used in Nautilus with a looser interpretation to essentially trigger the example.
This debate started 7 days before the release. The reason why the debate started is that exactly one method started to use it differently than all other <example> methods from the Pharo image. While this debate fired on, GT does not build and cannot be integrated, even though in parallel we work like mad to meet the deadline and fix all issues that are being reported.
And the way the debate took place is also borderline for my taste, too. I do not appreciate being shout at. I am not mad, but please do not expect me to be happy either.
I also find it discouraging that people talk about GT as if it would not be Pharo or as if we would want to force people to do things. We are indeed a standalone team with an own set of ideas, but we do not want to force our work on anyone. As the decision was to make GT a central part of Pharo, we kindly ask you to treat us as part of Pharo.
We never shied away from debates and listening to people. In fact, we think we are going over the board with actively listening and reacting. We can still debate the <example>, but not now. We have a release to meet. We can talk about it afterwards. But, for this to happen, I also kindly ask you to remove the <example> check from #isExampleMethod. This would allow us to start from a clean slate in Pharo 5.
Cheers, Doru
On Thu, Mar 26, 2015 at 12:06 PM, Esteban Lorenzano <estebanlm@gmail.com <mailto:estebanlm@gmail.com>> wrote: Ok⦠my 2c:
Basically there is a difference between an âexampleâ and a prototype, which is what the gtExample intends to do. Exemplar is just another way to name a prototype. Sorry to make you sad and tired⦠but when you introduce such an important new tool as all the gtools are, you cannot expect people to accept all your choices âas isâ⦠and debate is the only way to achieve some consensus.
Esteban
ps: we are just days from release and we are all stressed a lot⦠so lets take a breath and consider things with the appropriate distance. We are not talking about the cure for cancer here, just the right name for a pragma, in a method.
On 26 Mar 2015, at 10:02, Torsten Bergmann <astares@gmx.de <mailto:astares@gmx.de>> wrote:
Hi Tudor,
We will rename <example> back to <gtExample> and keep the API as it is. That will leave Pharo 4 with one <example> method while the other 100 will >use <gtExample>. This will be available with the next GT integration.
As I already wrote (and Guillermo equally pointed out): most of them are there because you created/introduced many extension methods with GT to provide these sample instances like in $a for Charater or 42 for Integer, ... Which is completely valid to demonstrate how usefull your new extension is. But it is because you investigated so far more to demonstrate this new mechanism.
And yes, currently we have just one <example> in the image (beside some other in external projects). But if we do not want to rely on the exampleXXX pattern anymore we will mark the typical example methods with <example> in the future and would have around 140 in the latest image:
|coll| coll := IdentitySet new. Object withAllSubclassesDo: [:aClass | aClass class selectorsDo: [:selector | (selector beginsWith: 'example') ifTrue: [ coll add: selector ] ]]. ^coll
If we dont mark them I agree that there are only a few counterwise.
But again: from my side it is not about the current numbers. It is about the future mechanism, clear and understandable concepts and naming.
The usualy exampleXXX demos for code fits well with <example> from the name and mentally. "Example" is a very generous term for something to look at and learn.
In Pharo one can now demonstrate in the new GT inspector lively ready made instances! You feature and the research bound to it is not only important but a real improvement. I like that and I'm sure this will push us forward a lot.
Still IMHO mentally using <example> for depicting "code to look at" does fit namewise and conceptualy very well with the known and usual example methods in the image or external packages. Some of them provide an instance, but many of them just show how to use code.
And yes: I would the new GT mechanism to use a term and pragma name that better depicts what should be provided from the one who uses it: typical example instances or exemplars of the class.
When one creates a class
Object subclass: #RevolutionarySystem instanceVariableNames: 'name' classVariableNames: '' category: 'The-World'
he can implement a class side method to use the new mechanism:
uniqueExemplar <exemplar>
^RevolutionarySystem called: 'Pharo'
And this class side method returns an exemplary instance. If such a method should also serves as an example method (in the tradition of a code example to look at) one can even mark it with both pragmas.
The decision has nothing to do with arguments.
Why do you negotiate instead of (at a minimum) ellaborate what you think of the made proposal to use "exemplar" for the new GT mechanism.
See the definition for <exemplar>:
http://dictionary.reference.com/browse/exemplar <http://dictionary.reference.com/browse/exemplar> "a model or pattern to be copied or imitated" "a typical example or instance"
http://www.thefreedictionary.com/exemplar <http://www.thefreedictionary.com/exemplar> "One that is worthy of imitation; a perfect example or model" "One that is typical or representative"
http://www.merriam-webster.com/dictionary/exemplar <http://www.merriam-webster.com/dictionary/exemplar> "an admired person or thing that is considered an example that deserves to be copied" "a typical example"
http://www.ldoceonline.com/dictionary/exemplar <http://www.ldoceonline.com/dictionary/exemplar> "formal a good or typical example"
http://www.dict.cc/?s=exemplar <http://www.dict.cc/?s=exemplar> "instance" "specimen" "sample"
All the 100 instances now returns by GT extension are such exemplars: they are typical instances like $a or 42 one can use as a model or pattern to be copied or imitated.
Would'nt that perfectly fit with what you intended with your new feature: the preview should help people to just inspect a class, look at the new "e.g." tab and learn from premade instances?
The release is too important and we got distracted from the goal.
No doubt that the release is important and fixing it NOW from the technical side is easy as I demonstrated with the changeset. I guess rolling back <gtExample> would take you more time than reviewing it.
Before doing any action on your side I would really like to know your opinion about <exemplar>. I'm fine when you can not accept it - but please tell me about the reasons.
Bye T.
-- www.tudorgirba.com <http://www.tudorgirba.com/>
"Every thing has its own flow"