Yes, but those API are documented as potentially lossy.  It's an express 
contract the user enters into at construction time.  I think this is 
reasonable.  What is important is that we don't have this: Double > Float > 
Long 
> ...  Everything is an extension of Number.  This allows us to pass primitive 
wrappers by their concrete types when we want to avoid implicit conversions and 
possible loss of precision, or pass them as Number when we don't care for some 
reason.

 Alexey





________________________________
From: Miroslav Pokorny <[email protected]>
To: [email protected]
Sent: Mon, December 6, 2010 10:10:13 PM
Subject: Re: [The Java Posse] Re: James Gosling on Apple, Apache, Google, 
Oracle 
and the Future of Java

Yes but Number itself has lossy getters. Long.byteValue() breaks LSP which 
itself models the situation as expressed previously about raw primitives.
 
-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.



      

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to