<br><br><div class="gmail_quote">On Thu, Jul 16, 2009 at 12:34 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/7/16 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
<div class="im">&gt; Hi All,<br>
&gt;     in working on Cog I need the concept of &quot;here class&quot;, the class of the<br>
&gt; current method.  Analogous to super, where a lookup starts above the class<br>
&gt; of the current method, here class is the class of the current method.  if<br>
&gt; you&#39;re for example collecting sets of selectors for translation to C then<br>
&gt; you need to talk about the selectors of this method&#39;s class, not the<br>
&gt; selectors of some subclass which may simply extend the base class a little.<br>
&gt; One clumsy implementation is the following<br>
&gt;     thisContext method methodClass<br>
<br>
&gt; which one might use as in<br>
&gt;     thisContext method methodClass theNonMetaClass selectors do: [:sel| ...<br>
&gt; Given this isn&#39;t important enough to change the language and add a new<br>
&gt; pseudo-variable such as hereClass I just want to add it to ContextPart, e.g.<br>
&gt;     thisContext thisClass<br>
&gt; Anyone done this before, and if so what did you call it?<br>
<br>
</div>If you&#39;re want only to short-cut writing:<br>
<br>
     thisContext method methodClass<br>
<br>
then why use other selector than methodClass?<br>
<br>
Btw, in Pharo image (which i currently running) there is already such<br>
thing, implemented as:<br>
ContextPart&gt;&gt;methodClass<br>
        &quot;Answer the class in which the receiver&#39;s method was found.&quot;<br>
<br>
        ^self method methodClass ifNil:[self receiver class].<br>
<br>
A method stamp reads:<br>
md 2/17/2006 18:41 · debugger access<br>
<br>
so it looks like it been there for a while.</blockquote><div><br></div><div>Good. methodClass it is.  Thanks!</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<div><div></div><div class="h5"><br>
&gt; Anyone have strong opinions on the selector (not the technique; needs must<br>
&gt; when Slang drives)?<br>
&gt; Anyone have strong opinions on whether I add this as a kernel method or just<br>
&gt; keep it as a VMMaker extension?<br>
&gt; Best<br>
&gt; Eliot<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</font></blockquote></div><br>