[std-interval] Tags

first.i.last at comcast.net first.i.last at comcast.net
Wed Apr 5 18:54:25 PDT 2006


> ----------------------------------------------------------------------
> Message: 1
> Date: Tue, 04 Apr 2006 20:57:00 -0500
> From: George Corliss <George.Corliss at marquette.edu>
> Subject: Re: [std-interval] C++ interval std
> To: For discussions concerning the C++ standardization of intervals
> 	<std-interval at compgeom.poly.edu>
> Message-ID: <C0588E1C.38EC%George.Corliss at Marquette.edu>
> Content-Type: text/plain;	charset="US-ASCII"
> 
> Sylvain Pion wrote:

> >>  Aside: The next day, we visited Berkeley and
> >> talked with Jim Demmel and Bill Kahan.  Among other things, Kahan
> >> wants user-defined data types to be tagged.  If we have the
> >> Kahan-suggested tag, we can tag intervals as Uninitialized.
> > 
> > Could you elaborate on this tag ?  What would it do ?
> > Would this be a run-time feature of the objects telling if
> > they are initialized or not ?  Can't this be left to some
> > "debug mode" ?
> Let me explain Kahan's reasoning, as well as I am able.
> 
> The request is that a tag be permitted by the standard.  As I understand it,
> what would be required is to remove the phrase that an interval is
> represented by two values.  The down side, of course, is that it is harder
> to know how much memory an interval may require.

That's what sizeof() is for.  Users who "know" the sizes of types are  sources of errors.  Let's not encourage them.

> 
> If we are permitted a tag, the tag can be used in MANY different ways within
> an implementation.  The tag could be an attribute, or it could be a pointer
> to a complicated internal data structure of properties of the interval.  The
> most extreme case I can think of is that the tag might point to the Abstract
> Syntax Tree that generated the interval, allowing run-time symbolic
> processing.
> 
> In most implementations I can imagine, the tag could be used for
> "uninitialized," "exterior interval," various flavors of NaN, precision in a
> multiple precision implementation, and the like.  If we want a (center,
> radius) implementation, a tag could distinguish semi-infinite intervals, or
> it could distinguish [lo, hi] from (center, radius) intervals.

Logically a tag is just a container for properties.  The existence of tags in the proposal might lead to questions about how they will be used and a demand for standardized properties.  That demand should be refused as premature.  The issue is not standardizing the properties but allowing implementors to create them directly rather than as shadow variables with the associated extremely high performance costs.

==================

-- Lee Winter



More information about the Std-interval mailing list