gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native ObjC exceptions configure test broken with libobjc2


From: Nicola Pero
Subject: Re: Native ObjC exceptions configure test broken with libobjc2
Date: Sat, 18 Sep 2010 22:00:02 +0200 (CEST)

> Actually, this test will fail with Apple's Modern Runtime too - Object no 
> longer implements +new.
> If you define __OBJC2__ (which recent Apple compilers do, you only get these 
> two methods on Object:
> 
> +class;
> -(BOOL) isEqual:anObject;
>
> +new is no longer allowed, so there is no defined way of creating Object 
> instances.

Ok, that is a good point.  I don't even understand why they kept the Object 
class then! ;-)


> I've already fixed most of the configure scripts to define their own root 
> class, 
> if they need it.  It should be trivial to copy one of those across into this 
> test.

But I don't think anyone can find this solution satisfactory ... surely it 
doesn't
make sense to copy&paste the same code to create a root class across every 
single testcase ?

It would be much more logical for the runtime to provide one working class that 
you can use
to run trivial tests without having to reimplement your root class in every 
single testcase ?

I thought that was the point of the Object class (nowadays).  A single, minimal 
working class 
that you can use to write testcases and configure checks. :-)

It makes sense to slim down the Object class in the GNU runtime for forthcoming 
releases, but 
to keep it usable for testcases and configure checks.  So, we'd probably keep a 
few more methods 
than Apple does (I haven't discussed this with Andrew Pinski yet though so it's 
just my own
ideas). ;-)

I guess Apple doesn't care about testcases since they assume you're using Apple 
and there is
nothing to test. ;-)

So, maybe a better solution would be to assume that (eg) @try/@throw/@catch 
works on Apple/NeXT 
runtime (ie, NeXT runtime AND __OBJC2__), and have a normal test using Object 
elsewhere ?

Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]