i like that idea.&nbsp; if i ever manage to make up my own smalltalk, or my own language, that will defiantly by considered in making it.<br clear="all">David Zmick<br>/dz0004455\<br><a href="http://david-zmick.co.cc">http://david-zmick.co.cc</a><br>

<br><br><div class="gmail_quote">On Thu, Nov 27, 2008 at 11:08 PM, Ralph Boland <span dir="ltr">&lt;<a href="mailto:rpboland@gmail.com">rpboland@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
My idea here is too late for squeak but is food for thought <br>for the next great object oriented programming language.<br><br>Instead of using a full fledged message send for accessing<br>instance variables we could&nbsp; use a compromise.&nbsp; <br>

<br>Lets say that symbol&nbsp; @&nbsp; is special and cannot be used as a regular message<br>and let&nbsp; var be an instance variable of a class MyClass and&nbsp; used in MyClass<br>method myMethod.<br><br>Then to access var in myMethod we can write:<br>

<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @ var.<br><br>as in:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^ @ var<br><br>or even:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @ var := 5.<br><br clear="all">With this notation local variables and instance variable are distinguishable<br>which results in safer and (arguably) more readable code.<br>

<br><br>One way of implementing this would be to require that MyClass<br>define&nbsp; instance variable var or an error message would be generated.<br><br>The other way of&nbsp; doing this would be to not require that MyClass define var.&nbsp; However, if&nbsp; var is not defined, then myMethod would be abstract and unusable<br>

by MyClass.&nbsp; Instead only subclasses of MyClass that define <br>instance variable var could use the myMethod.&nbsp; This would mean that versions<br>of myMethod would need to&nbsp; be compiled for each subclass that defined var.<br>

If the additional byte code generated was considered too wasteful then<br>one could always use regular message sends.<br>I would strongly recommend that&nbsp; abstract variables (such as var) and abstract<br>methods somehow be clearly marked.<br>

I would also recommend that, when var is defined in a subclass,&nbsp; symbol&nbsp; @ be<br>placed in front of it to flag that an abstract variable is being made concrete<br>as opposed to a brand new instance variable being created.<br>

<br>(calm) opinions welcome.<br><font color="#888888"><br>Ralph Boland<br>
</font><br><br>
<br></blockquote></div><br>