Liskov means that you can write code which depends on the exact rounding
behaviour of a float, and it would fail if working with a double.  The types
are not transparently substitutable.

This isn't a subclasses relationship, nor can it be - given that primitives
aren't held by reference.

The specification is, quite simply, misleading
On 6 Dec 2010 23:24, "Miroslav Pokorny" <[email protected]> wrote:
> Liskov principal means a long can stand in for a int and teh caller will
> work unmodified w/ both. Given some conversion is required between the two
> and the bit patterns are different (eg byte -> double), there is no
> substitution there is only conversion. One needs different bytecode to do
> whatever with an int and all the other primitives ignoring boolean and
other
> different/weird cases.
>
> --
> 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]<javaposse%[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