<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Sep 5, 2008 at 12:49 PM, Colin Putney <span dir="ltr">&lt;<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</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;">
<div class="Ih2E3d"><br>
On 5-Sep-08, at 1:38 PM, Stephen Pair wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What is the point of Objective-J? &nbsp;I looked into it a while back and didn&#39;t get it. &nbsp;The only advantage I could imagine was being able to take some Objective-C code and readily port it to Objective-J. &nbsp;And perhaps the familiarity of the syntax to people that already know Objective-C is worth something. &nbsp;But, in most respects, Objective-C is inferior to Javascript as far as I can tell (for example Objective-C lacks closures).<br>

</blockquote>
<br></div>
I&#39;ve never used Objective-J, so I don&#39;t know for sure, but one thing that I find attractive is that it introduces message sends. It&#39;s easy to forget, but object.doSomething() is *not* a message, it&#39;s a property access and function call.</blockquote>
<div><br>Could you say a bit more about why this is, if possible in the context of Self message sends - e.g. would you say that in Self <br><br>object doSomething<br><br>is not a message because it is a slot access? <br><br>
&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> This causes real problems - see for example, all the advice against modifying the Object prototype, because it renders the for...in construct useless. </blockquote>
<div><br>for...in works as advertised enumerating every property associated with an object. hasOwnProperty is available in cases where it&#39;s necessary to distinguish between instance and inherited properties.&nbsp; The problems with for...in stem in large part from the large body of code in use written by people who either didn&#39;t know about or didn&#39;t understand prototype-based OO and thus *assumed* there were only instance properties. If one doesn&#39;t need libraries which make this above-mentioned assumption, modifying Object.prototype is no more an issue than modifying Object in Squeak. Depending on one&#39;s view about Namespaces, that could be a significant issue, but I don&#39;t see how it has anything to do with for...in. <br>
<br>Laurence<br><br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If Objective-J solves that problem, it&#39;s valuable.<br><font color="#888888">
<br>
Colin<br>
<br>
</font></blockquote></div><br></div>