db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RPost" <rp0...@pacbell.net>
Subject Re: Type system notes
Date Sat, 19 Feb 2005 04:03:00 GMT
>"Daniel John Debrunner" wrote:

>Language Compilation
>Much of the generate code for language involves the type system. E.g. SQL
operators are converted to method calls >on interfaces within the type

Method calls on interfaces certainly represent polymorphism at its finest
and I am not questioning their use in Derby. But they also make it more
difficult, for me at least, to abstract the actual technical requirements
from the code itself.

The SQLInteger.java has a 'plus' method whose signature is:
   public NumberDataValue plus(NumberDataValue addend1,
                                                  NumberDataValue addend2,
                                                  NumberDataValue result)

All of the parameters and the return value are interfaces.

Would you shed some light on the actual technical requirements for the
'plus' method?

In other words, can the type of each parameter and result value literally be
any and all present and future implementations of the NumberDataValue
interface? That is, is it a derby requirement that the 'plus' method be
capable of being called with 'addend1', 'addend2' and 'result' parameters
being three distinct classes? Or is this just a convenience to make the code
generation more efficient?




Mime
View raw message