Hi Phil,
 
it is already (since a long time) possible to mark a method with <example> including
the icon clickable thing. 

But now (and already a year ago) Tudor wants to change semantics - as such marked methods always have to
return a single sample instance of the class instead of being what they are now: just a little
bit of code examples that can do anything and return anything. 

I would vote for a different pragma for his approach like <sample> or <exemplar> better justifiying
what the method does: returning a sample instance.
 
Thanks
Torsten
 
Gesendet: Montag, 19. Dezember 2016 um 10:24 Uhr
Von: "[email protected]" <[email protected]>
An: "Pharo Development List" <[email protected]>
Betreff: Re: [Pharo-dev] a request to change the meaning of <example> pragma
Ok, thx. Will try.
 
I am tired of examples in comments, selecting stuff etc when it is possible to have a click on an icon.
 
Thx for this thing.
 
Phil
 
On Mon, Dec 19, 2016 at 8:34 AM, Tudor Girba <[email protected]> wrote:
We did not try, but it should not be a problem, except for the fact that there will be a GTExample class in Pharo 5 packaged with GTInspector.

Cheers,
Doru


> On Dec 19, 2016, at 12:51 AM, [email protected] wrote:
>
> Is it possible to have examples in a 5.0?
>
> Phil
>
> On Sun, Dec 18, 2016 at 10:49 PM, Tudor Girba <[email protected]> wrote:
> Hi,
>
> As you might know, a while ago we created GTExamples, a framework that supports both example-based live documentation and testing:
> http://gtoolkit.org/doc/Examples/examples.html
>
> GTExamples was part of the GTInspector for a while, but as it evolved, we pulled it out in a separate project. This separate project is not in Pharo anymore but it is part of the full GToolkit configuration (Pharo only ships the core of GToolkit). The idea of taking GTExamples out was to allow the community to have a more elaborate discussion about the role of examples in our environment.
>
> I have invited you to join that conversation, but it did not take off. I understand that perhaps the topic does not look appealing at this moment.
>
> We will certainly continue to evolve GTExamples both on the semantics level of the dependency constructs and on the integration with tools. Our goal is to enable a new practice that I would like to call Example-Guilded Development (or Example-Driven Development), and position Pharo to be the only platform on which someone can do that. But, that is our goal, and does not have to be the same with other people’s goal.
>
> Right now, GTExamples relies on the <gtExample> pragma to denote a method that returns an object that exemplifies something. Executing this method as an example should have no side-effects (either because the method itself does not have a side-effect, or because the example method defines how the cleanup should happen using the mechanism provided by GTExamples).
>
> This meaning is different from the meaning of the <example> pragma used through Pharo.  There are currently 55 places that use this pragma inside Pharo and most of them come from FastTable. As things will progress and more libraries might use GTExamples, the situation can become confusing.
>
> To make things less confusing in the future, I would like to define the meaning of the <example> to denote a method that returns an object without having side effects. Would you agree with this?
>
> If yes, I would suggest the name of the new pragma that would replace the existing one to include “script” in the name. For example, <sampleScript>.
>
> What do you think?
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Reasonable is what we are accustomed with."
>
>
>

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."




 

Reply via email to