🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.eiffel
Article #1533

Unconstrained genericity

#1533
From: Chris Hind Genly
Date: Tue, 06 Feb 1990 21:33
30 lines
1611 bytes
There are a very restrictive set of actions that can be performed on
entities of unconstrained generic type.

        - They can be on the left of ':='
        - They can be on the right of ':='
        - They can be compared for equality and inequality
        - They can be passed
        - They can be returned.

Basically, the entity may be moved around, but not operated on.

This suggests a simple implementation.  When passing an entity as an
argument to a routine which expects an unconstrained generic argument,
just past it in the normal fashion, regardless of whether the argument
is a scalar or a reference to an object.  In general an entity of
uncontrained generic type would be treated exactly like an integer
would, except it could not be involved in operations other than the
ones listed above.

This would lead me to believe that integers, reals, and references
must all be the same size.  Which would, on most machines, imply that
Eiffel reals are C floats, and not C doubles.

Is this true for the ISE implementation?  If not, what do they do?
--
=======================================================================
Chris Hind Genly, N1GLZ - Multiflow Computer - mfci!genly (203)488-6090

	
Technical Details
Message-ID: <1221@m3.mfci.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!mfci!m3!genly

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!mfci!m3!genly
From: genly@bubble.multiflow.COM (Chris Hind Genly)
Newsgroups: comp.lang.eiffel
Subject: Unconstrained genericity
Message-ID: <1221@m3.mfci.UUCP>
Date: 6 Feb 90 21:33:41 GMT
Sender: news@mfci.UUCP
Distribution: comp
Organization: Multiflow Computer Inc., Branford, CT
Lines: 30