comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Pb with use of redefined "=" operator
Date: 1998/11/09
Date: 1998-11-09T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.05.9811092044320.1064-100000@shell5.ba.best.com> (raw)
In-Reply-To: wccg1bssf6n.fsf@world.std.com

On Mon, 9 Nov 1998, Robert A Duff wrote:

> Matthew Heaney <matthew_heaney@acm.org> writes:
> 
> > Why would anyone complain about using a component that always works?
> 
> Because it's too slow?
> 
> Maybe it's no big deal for your stack example -- maybe the stack needs
> 100 words, and the tag field makes it 101.  But suppose the abstraction
> were "point-in-a-plane" or "complex", where the thing needs two words of
> useful data -- in that case, adding a tag field is a huge space
> inefficiency.  And don't tell me memory is cheap -- it takes time to
> initialize it, and it can wreck your caching behavior, which costs time,
> and time is *not* cheap.

I agree that certain "small" data types are best not tagged, but I would
think that a collection in general is not such a type. Indeed, we have to
use tagged types for collections if we want the ability to treat them as 
values and define our own ":=". I'm definitely struggling with some of the 
same issues that Matt is struggling with, in my own attempts to create a 
flexible, usable, and most of all, efficient, data structure library. I
haven't found any totally satisfactory approaches.

I really liked the way that Sather divided its types into immutable (stack
allocated) value types and mutable (heap allocated) reference types, and
how it also used $ for the polymorphic abstract types. Too bad its a dead 
language. In any case, its lack of a proper module system was really a 
pain.

> > If using a language feature to make an abstraction work is "gratuitous,"
> > or seems like a "trick," then that is a telling observation of the
> > language itself!
> 
> Yes, the language has a flaw.

Unfortunately, it has many, many flaws. The real pity is that I don't
think that there are really any better languages out there in the same
language design space. Maybe one day someone will design a successor to 
Ada unencumbered by backwards compatibility (*).  

-- Brian

(*) No, Eiffel isn't even close, IMO.






  reply	other threads:[~1998-11-09  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-03  0:00 Pb with use of redefined "=" operator Fran�oise & Herv� BITTEUR
1998-11-04  0:00 ` dewarr
1998-11-04  0:00   ` Tucker Taft
1998-11-04  0:00 ` Mats Weber
1998-11-04  0:00   ` Fran�oise & Herv� BITTEUR
1998-11-04  0:00 ` Matthew Heaney
1998-11-04  0:00   ` Mats Weber
1998-11-05  0:00     ` Matthew Heaney
1998-11-05  0:00       ` Mats Weber
1998-11-05  0:00         ` Matthew Heaney
1998-11-09  0:00           ` Robert A Duff
1998-11-09  0:00             ` Brian Rogoff [this message]
1998-11-10  0:00               ` Robert A Duff
1998-11-10  0:00             ` Robert I. Eachus
1998-11-05  0:00       ` dewarr
1998-11-05  0:00         ` Matthew Heaney
1998-11-06  0:00           ` dewarr
1998-11-09  0:00             ` Robert A Duff
1998-11-10  0:00               ` dennison
1998-11-10  0:00                 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox