Login  Register

Re: <example> pragmas and example* methods use-cases

Posted by Nicolai Hess on Jun 30, 2015; 6:10am
URL: https://forum.world.st/example-pragmas-and-example-methods-use-cases-tp4833428p4834734.html



2015-06-29 20:10 GMT+02:00 Sean P. DeNigris <[hidden email]>:
Peter Uhnák wrote
> It seems that
> <sample>
>  is then the go-to naming for now

I agree with Ben that from a native English perspective, exemplar doesn't
quite sound right.

Sample and Example are the two words that most clearly capture the intent.
The problem with using #sample to return instances and #example to
illustrate usage is that it's a bit too subtle. Even though technically one
could argue the logic of that distinction, in reality English speakers use
them interchangeably and it will be confusing. A core principle of Smalltalk
is to type a bit more to make things clearer (e.g. avoid
single-character/abbreviated variable names). I strongly feel we should be
more specific and uniform by either using (<exampleInstance> &
<exampleCode>) or (<sampleInstance> & <sampleCode>).


<sample> for example instances
<demo> for examples opening a window or any other interaction

?



 


-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/example-pragmas-and-example-methods-use-cases-tp4833428p4834670.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.