FROM : glenn andreas
DATE : Wed Feb 06 16:45:43 2008
On Feb 6, 2008, at 3:39 AM, John Engelhart wrote:
>
> On Feb 5, 2008, at 7:40 AM, Alastair Houghton wrote:
>
>> On 5 Feb 2008, at 00:14, John Engelhart wrote:
>>
>>> I had such high hopes for Cocoa's GC system because once you're
>>> spoiled by GC, it's hard to go back.
>>>
>>> Unfortunately, the 4-5 months of time I've put in on Leopard's GC
>>> system has not been nearly as pleasant. It has been outright
>>> frustrating, and it's reached the point where I consider the
>>> system untenable.
>>
>> Honestly, this point has now been answered over and over.
>>
>> I think it comes down to the fact that you have failed to
>> appreciate that Cocoa GC is designed for easy use with *OBJECTS*.
>> If you're using it with objects, it "just works".
>
> You misunderstand what Objective C is, and how it works. "Objects"
> is synonymous for "Structs".
If that were true, you'd be able to declare objects as local variables
(as opposed to as pointers to structures):
NSPoint aPoint; // <-- NSPoint = struct, legal
NSString aString; // <-- NSString = object, Illegal
(yes, at one time there was an attempt to add support for that, but it
didn't survive).
Structures don't have "magic invisible members":
@interface Foo {
}
@end
Foo *aFoo;
NSLog(@"Foo is a %@", aFoo->isa);
Notice how there is an "isa" member that is automatically put there,
not unlike the way that a C++ object might have a vtable (or other
internal plumbing for multiple inheritance).
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
DATE : Wed Feb 06 16:45:43 2008
On Feb 6, 2008, at 3:39 AM, John Engelhart wrote:
>
> On Feb 5, 2008, at 7:40 AM, Alastair Houghton wrote:
>
>> On 5 Feb 2008, at 00:14, John Engelhart wrote:
>>
>>> I had such high hopes for Cocoa's GC system because once you're
>>> spoiled by GC, it's hard to go back.
>>>
>>> Unfortunately, the 4-5 months of time I've put in on Leopard's GC
>>> system has not been nearly as pleasant. It has been outright
>>> frustrating, and it's reached the point where I consider the
>>> system untenable.
>>
>> Honestly, this point has now been answered over and over.
>>
>> I think it comes down to the fact that you have failed to
>> appreciate that Cocoa GC is designed for easy use with *OBJECTS*.
>> If you're using it with objects, it "just works".
>
> You misunderstand what Objective C is, and how it works. "Objects"
> is synonymous for "Structs".
If that were true, you'd be able to declare objects as local variables
(as opposed to as pointers to structures):
NSPoint aPoint; // <-- NSPoint = struct, legal
NSString aString; // <-- NSString = object, Illegal
(yes, at one time there was an attempt to add support for that, but it
didn't survive).
Structures don't have "magic invisible members":
@interface Foo {
}
@end
Foo *aFoo;
NSLog(@"Foo is a %@", aFoo->isa);
Notice how there is an "isa" member that is automatically put there,
not unlike the way that a C++ object might have a vtable (or other
internal plumbing for multiple inheritance).
Glenn Andreas <email_removed>
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate






Cocoa mail archive

