[Pharo-users] On Class and Method comments

Dimitris Chloupis kilon.alios at gmail.com
Tue May 17 17:24:04 EDT 2016


yes template looks fine to me, basic classes is a good place to start too.
I will give it a try and see how it goes :)

On Tue, May 17, 2016 at 10:55 PM stepharo <stepharo at free.fr> wrote:

>
> I really like to start writing some class and method comments to make
> Pharo image more beginner friendly.
>
>
> This would be realllllllllly coool.
> Did you check the class comment template because I wrote it thinking about
> this.
>
> What I think would be great is to have great comments for the basic
> classes. Because as a newby such classes are really important.
>
> For example I would like to enhance the symbol class comment to include
> the snippet sent by henrik
>
> | s1 s2 |
> s1 := 1234 asString. s2 := 1234 asString.
> s1 = s2. "true" s1 == s2. "false"
> s1 asSymbol = s2 asSymbol. "true" s1 asSymbol == s2 asSymbol. "true"
> (s1 class allInstances select: [:s | s = s1 ]) size. "2" (s1 asSymbol
> class allInstances select: [:s | s = s1 asSymbol ]) size. "1"
> [ #stringA = #stringB ] bench. "26,812,864 per second" [ 'StringA' =
> 'StringB' ] bench. "3,492,987 per second"
>
> Are there any guidelines when and how to comment classes and methods ?
> What about inline comments ?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160517/adadc9f7/attachment.html>


More information about the Pharo-users mailing list