atom feed8 messages in net.java.dev.rococoa.usersnil
FromSent OnAttachments
Duncan McGregorJul 17, 2009 8:01 am 
David KocherJul 17, 2009 8:40 am 
Duncan McGregorJul 17, 2009 9:14 am 
David KocherJul 17, 2009 3:52 pm 
Harald KuhrJul 18, 2009 3:40 am 
Andrew ThompsonJul 18, 2009 4:54 am 
Andrew ThompsonAug 7, 2009 8:21 pm 
Duncan McGregorAug 10, 2009 8:00 am 
Subject:nil
From:Duncan McGregor (dun@oneeyedmen.com)
Date:Jul 17, 2009 8:01:19 am
List:net.java.dev.rococoa.users

I'm canvassing opinion on Rococoa's handling of nil.

As I understand it, ObjC silently ignores messages sent to nil, whereas Java throws NullPointerException if you try to invoke a method on null.

I'm trying to decide what I think, but here is a taster of the issues - if you call a ObjC method that is defined to return an NSObject, and the returned value is actually nil, should that return a Java null, or an instance of our Java NSObject that has nil inside it?

If the latter, should invoking methods on the Java NSObject throw NullPointerException (they currently do - is anyone relying on that behaviour) or pass down to ObjC to be silently ignored?

Does anyone know what the Java/Cocoa bridge does?

Duncan