[Isolate-interest] second public review of the JSR 121
Grzegorz Czajkowski
gczaj at sfbay.sun.com
Wed May 25 19:59:10 EDT 2005
Hi Pat,
thanks a lot for your remarks. Just one comment for now:
> Could you side-step some of this by adding a parameterized 'put'
> method:
> public static <T> void newMessage(<T> type);
> (Again, I'm totally ignorant of this new fangled parameterization
> syntax, so perhaps this is obviously bunk.)
The motivation behind many new*Message() methods is that each of them
is typed, so we rely on the type system to prevent construction of
messages out of objects whose types can't be transported on links. Using
generic newMessage() would work but then we'd have to document in text
which types are admissible. IMO such a take is worse than what we have
in the current API.
Another reason is the treatment of null objects: the current API
distinguishes between say a null byte array and a null isolate sent on
a link. Getting the same effect of "typed nulls" with the generic
newMessage() method is likely to be cumbersome.
-- Greg
More information about the Isolate-interest
mailing list