Re: Storing data and code in a Db with LISP-like interface

From: Alfredo Novoa <alfredo_novoa_at_hotmail.com>
Date: 6 May 2006 05:27:55 -0700
Message-ID: <1146918475.531799.278790_at_i39g2000cwa.googlegroups.com>


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 - 14:27:55 CEST

Original text of this message