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."


Reply via email to