logo       

RE: >> notation: msg#00188

lang.smalltalk.squeak.beginners

Subject: RE: >> notation

> Stephane, bless you for all the great work you have done in
> teaching Smalltalk!
>
> I'm not anywhere near the level to appreciate Point>>#x yet.
> I'm still grappling with what you mean by "contextual information".
>
> You mention the browser, how would I use it to understand the
> MyClass>>doThis statement? Or is this even a good example for
> MyClass>>understanding
> ">>"?

What he means is >> is just something people do when they write about
Smalltalk code. Smalltalk code isn't written in files like in other
languages, it's written in a class browser, so you can't just say

class SomeClass {
void Method(){
//some code
}
}

So, by convention, when writing code in a text based format like email,
Smalltalk'ers simply put the class name before the method name and separate
them with >>

SomeClass>>method
"some code"

It's not something you would actually do in code... Only when writing about
code. In code, you'd simply browse to the SomeClass class, select a method
category, and then edit the empty method template, or choose an existing
method to edit.

Ramon Leon
http://onsmalltalk.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise