This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

NICE Language Committee: general

From swissoft.h.provi.de!eiffel@Hannover.POP.DE Mon Oct  9 11:10:07 1995
Date: 09 Oct 1995 18:57:00 +0200
To: bertrand@eiffel.com
Cc: tynor@atlanta.twr.com
Subject: A problem with GENERAL
X-Mailer: XP v3.02 R/C4131
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 488
Status: RO
X-Lines: 13

Dear Bertrand, dear Steve,

today I came accross a problem I've encountered earlier but I had
forgotten it: class GENERAL uses features of other classes (e.g.
BOOLEAN) which are exported to ANY but not to GENERAL. How should
one deal with this? My compiler has to cheat here - otherwise
GENERAL is rejected.

With best regards,
        Michael
SwisSoft, Michael Schweitzer      Geismar Landstr. 16  D-37083 Goettingen
Fax : +49 551 770 35 44           email : eiffel@swissoft.h.provi.de


From tynor@atlanta.twr.com Mon Oct  9 11:49:46 1995
Date: Mon, 9 Oct 95 14:35:54 EDT
To: eiffel@swissoft.h.provi.de (Michael Schweitzer)
Subject: re: A problem with GENERAL
References: <5vWFtNkzLdB@swissoft.h.provi.de>
Cc: bertrand@eiffel.com
Content-Length: 819
Status: RO
X-Lines: 18

| today I came accross a problem I've encountered earlier but I had
| forgotten it: class GENERAL uses features of other classes (e.g.
| BOOLEAN) which are exported to ANY but not to GENERAL. How should
| one deal with this? My compiler has to cheat here - otherwise
| GENERAL is rejected.

Ours cheats too (export restrictions are not checked for the "builtin"
features of the basic types since we "know" that all those features are
exported to ANY and any user class will be an heir of ANY)

It is somewhat of a hack, isn't it? Alternatives are to 1) eliminate
class GENERAL and move all its features into ANY, or 2) change the
default export rules to export to GENERAL instead of ANY, 3) modify the
export status of at least those features _used_ by GENERAL, or 4) cheat.

For now, cheating seems acceptable,
Steve


From swissoft.h.provi.de!eiffel@Hannover.POP.DE Mon Oct  9 12:30:27 1995
Date: 09 Oct 1995 20:16:00 +0200
To: bertrand@eiffel.com
Cc: tynor@atlanta.twr.com
Subject: Re: A problem with GENERAL
X-Mailer: XP v3.02 R/C4131
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 811
Status: RO
X-Lines: 21

Dear Steve, dear Bertrand,

my compiler does not cheat that much. The 'trick' is, if the question
'is f available to GENERAL' is posed it gets replaced by 'is f available
to ANY'. But it's still cheating, of course.

Personnally, I'd prefer to eliminate GENERAL (or rename it to ANY,
which amounts to the same thing), because I always thought that it
is a very bad idea to introduce 'site-specific' features in ANY -
and I wonder whether anybody really does - it makes your reusable
libraries instantly site-specific too and thus less reusable.

But one could almost equally well change the default top class
from ANY to GENERAL.

With best regards,
        Michael

SwisSoft, Michael Schweitzer      Geismar Landstr. 16  D-37083 Goettingen
Fax : +49 551 770 35 44           email : eiffel@swissoft.h.provi.de


From tynor@atlanta.twr.com Mon Oct  9 13:00:03 1995
Date: Mon, 9 Oct 95 15:46:03 EDT
To: eiffel@swissoft.h.provi.de (Michael Schweitzer)
Cc: bertrand@eiffel.com (Bertrand Meyer)
Subject: Re: A problem with GENERAL
References: <9510091835.AA19544@atlanta.twr.com>
	<5vWFutdjLdB@swissoft.h.provi.de>
Content-Length: 631
Status: RO
X-Lines: 13

| Personnally, I'd prefer to eliminate GENERAL (or rename it to ANY,
| which amounts to the same thing), because I always thought that it
| is a very bad idea to introduce 'site-specific' features in ANY -
| and I wonder whether anybody really does - it makes your reusable
| libraries instantly site-specific too and thus less reusable.

For the record, I agree. I always advise people to resist the urge to
introduce a private copy of ANY (and to instead use a project-specific
"ANY" (named something else, of course -- e.g. MYPROJECT_ANY or
MYPROJECT_COMMON) that can be mixed in to their project's classes as
required).

Steve