[squeak-dev] Using V8 for other languages

Laurence Rozier laurence.rozier at gmail.com
Sat Sep 6 03:12:31 UTC 2008


On Fri, Sep 5, 2008 at 12:49 PM, Colin Putney <cputney at wiresong.ca> wrote:

>
> On 5-Sep-08, at 1:38 PM, Stephen Pair wrote:
>
>  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).
>>
>
> 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.


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

object doSomething

is not a message because it is a slot access?



> This causes real problems - see for example, all the advice against
> modifying the Object prototype, because it renders the for...in construct
> useless.


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.

Laurence



> If Objective-J solves that problem, it's valuable.
>
> Colin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080905/49bf5f24/attachment.htm


More information about the Squeak-dev mailing list