comp.lang.ada
 help / color / mirror / Atom feed
From: agate!doc.ic.ac.uk!uknet!mcsun!ub4b!cfmu!news@ucbvax.Berkeley.EDU  (Stef  Van Vlierberghe)
Subject: Re: question about generics
Date: 2 Sep 93 17:45:07 GMT	[thread overview]
Message-ID: <1993Sep2.174507.9699@cfmu.eurocontrol.be> (raw)

In article <CBLyxC.64x@crdnns.crd.ge.com> groleau@e7sa.crd.ge.com (Wes
Groleau x1240 C73-8) writes:

> P.S.  I have seen several "free"  variable  string  packages that have
> what is to me a RIDICULOUS  usage of access types, requiring all sorts
> of contortions by client packages to avoid dangling  pointers and heap
> exhaustion.  My package  and the ones I'm  complaining  about make the
> type private.

Wes, I believe that  introducing an arbitrary  limit is perfectly o.k.
in many situations, but it's just a technique that (in practice) won't
scale up.  If, rather than a simple  string,  you are  implementing  a
multi-file  screen  editor,  you might  want a list of  buffers,  each
buffer  is a list of lines and each line is a list of  characters.  My
favorite  editor has a 64K line length  limit, I have  already  opened
files of 160_000 lines, and often I had more than 20 files open at the
time (of  course I  *never*  hit all  limits in all  lists at the same
time).

The  technique  you  describe is elegant and simple, but I don't think
your  environment  is strong  enough to implement  my favorite  editor
(although  theoretically speaking, it could).  The packages with those
contortions  (typically) will scale up !  As most of the cost of these
contortions  is getting to understand the mechanism, one might as well
bite the bullet.

The *real* fun will obviusly start when we get a 9X compiler,  then we
will  be able to use  the  User-Defined  assignment  and  Finalization
(which I am so  terribly  fond  of) to  transparently  manage  all the
memory  without  any  help  from  the  client  code  (it  just  sees a
non-limited private type).

Where I live, we have terribly  suffered  from this  difficult  choice
between simple techniques that don't scale up and contortions that do,
but  are  quite  complex   indeed.  That's  why  I  did  my  share  of
complaining when the Mapping Specification didn't include User-Defined
Assignment,  and also why I can't praize the Mapping  Team enough, now
that this feature is in !

Halleluia ! God save the Mapping Team !

Thanks Tuck and Bob, you're heroes !

--------------------------------------------------------------------------
Stef VAN VLIERBERGHE            Eurocontrol - Central Flow Management Unit
stef@cfmu.eurocontrol.be        Avenue des Arts 19H
Tel: +32 2 729 33 42            B-1040 BRUSSELS
Fax: +32 2 729 32 16            Belgium

             reply	other threads:[~1993-09-02 17:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-02 17:45 Stef  Van Vlierberghe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-02 16:08 Question about generics Peter C. Chapin
2006-07-02 18:49 ` Martin Krischik
2006-07-03  6:30 ` Jeffrey R. Carter
2006-07-03 10:33   ` Peter C. Chapin
2006-07-03 11:42     ` Jean-Pierre Rosen
2006-07-03 16:44     ` Pascal Obry
2006-07-04  1:09       ` Peter C. Chapin
2006-07-04  6:17         ` M E Leypold
2006-07-04 10:48           ` Peter C. Chapin
2006-07-03 20:03     ` Jeffrey R. Carter
2006-07-03 20:18       ` Dmitry A. Kazakov
2006-07-04  0:08         ` Randy Brukardt
2006-07-04  7:48           ` Dmitry A. Kazakov
2006-07-04  0:43         ` Jeffrey R. Carter
2006-07-03  9:46 ` Martin Krischik
2006-07-04 13:29 ` Stephen Leake
2006-07-05 12:08   ` Dmitry A. Kazakov
1993-08-12 15:18 question " Robert I. Eachus
1993-08-11 18:48 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.
1993-08-11  0:25 agate!howland.reston.ans.net!europa.eng.gtefsd.com!darwin.sura.net!seas.g
1993-08-10 15:53 Robert I. Eachus
1993-08-09 21:29 Kenneth Anderson
1989-05-29 20:54 Question " "14827_DAVID PAPAY"
1989-05-29  7:02 "Jonathan B. Owen"
replies disabled

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