| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Storing data and code in a Db with LISP-like interface
Hi,
Mikito Harakiri wrote:
> How does integer "inherits" arithmetic operations? You need a covariant
> return type:
Integer inherits this:
> +(rational, rational) returns rational
So it is not neccessary to define this:
> +(integer, integer) returns integer
For instance: 2 + 2 returns 4, and 4 is rational and integer.
> But then, you have to redefine arithmetic operations for integers
> anyway. So what is the point of inheritance, then?
You don't have to redefine operations.
Regards
Alfredo
Received on Sat May 06 2006 - 07:27:55 CDT
![]() |
![]() |