<div dir="ltr"><br><br><div class="gmail_quote">On Fri, Sep 5, 2008 at 12:49 PM, Colin Putney <span dir="ltr"><<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>></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? I looked into it a while back and didn't get it. The only advantage I could imagine was being able to take some Objective-C code and readily port it to Objective-J. And perhaps the familiarity of the syntax to people that already know Objective-C is worth something. 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've never used Objective-J, so I don't know for sure, but one thing that I find attractive is that it introduces message sends. It's easy to forget, but object.doSomething() is *not* a message, it'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>
<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's necessary to distinguish between instance and inherited properties. The problems with for...in stem in large part from the large body of code in use written by people who either didn't know about or didn't understand prototype-based OO and thus *assumed* there were only instance properties. If one doesn'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's view about Namespaces, that could be a significant issue, but I don't see how it has anything to do with for...in. <br>
<br>Laurence<br><br> </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's valuable.<br><font color="#888888">
<br>
Colin<br>
<br>
</font></blockquote></div><br></div>