On Tue, Jun 23, 2015 at 6:13 AM, Peter Uhnák <i.uh...@gmail.com> wrote: > Thank you all for your answers (For whatever reason all replies by Torsten > to this thread ended up as separate threads.. maybe mail client issues?) > > It seems that <sample> is then the go-to naming for now. I also like that > the word starts differently so it's easy to differentiate them at a glance.
We should also see what Doru comes up with. > > > On Mon, Jun 22, 2015 at 5:17 PM, Torsten Bergmann <asta...@gmx.de> wrote: >> >> It is important to note that these methods COULD BUT >> MUST NOT RETURN an instance. Usually such a method is only there to >> demonstrate code. > > > I'm not sure I understand the purpose of this restriction. For example > BorderedMorph>>exampleGradient could on top of opening a morph also return > the instance. > If you are running it from Nautilus it makes no difference, but when you run > it manually you could also inspect the instance, so you could further > manipulate with it... in a sense two-in-one. :) > Otherwise you would have to get it via inspecting morph halos. > > Or in another sense you could either inspect <sample> and then manually run > it, or execute <example> that would on top of that also return inspectable > value of the <sample>. > > >> 2. returning examples >> ===================== >> While some example methods just demo code and code usage (like "Job >> example" or "BorderedMorph exampleGradient") >> a subset of them directly return an instance of the method defining >> class (like LabelMorph>>example). >> >> The idea of the GT Tools is to call these methods and display the return >> value as inspectable "instances" in the tools, >> so for instance if you inspect class VirtualMachine or Character you get >> a tab entitled "E.g." where you can click on >> these sample instances. >> >> GT and (because GT )now latest Pharo currently still uses "gtExample" >> method prefix or <gtExample> pragma to mark such methods and there >> is also to wish to remove the "gt" prefix. But with this we would have a >> clash with the other "exampleXXX" usage. >> >> => I would propose to mark the code examples that return an instance >> with an <exemplar> method. >> >> According to Google definition of <exemplar> noun - "a person or >> thing serving as a typical example or excellent model." > > >> >> Urban dictionary defines <exemplar> as "a typical or standard model >> or specimen" > > > As a side note... I think it's best to use urban dictionary for slang, and > not Pharo dev. :) Looking up the name of it there shows at least a bit of > self-reflection. :) Good idea, but even this can be misleading and the usual wiki concerns with apply. While (b) seems reasonable, (a) and (c) are very suspect. Note the author "placefake." http://www.urbandictionary.com/define.php?term=exemplar (a) the mythical task occupying any computer technician, preferably employed by a university or other educational institute, for their summer months of 'down time.' (b) a typical or standard model or specimen: (i.e. and example. just said with a really dorky 15th century word.) (c) any action performed by don swanner. by placefakeJune 04, 2010 cheers -ben