From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac39a12d5faf5b14 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-27 11:22:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Grace and Maps (was Re: Development process in the Ada community) Date: 27 Apr 2002 06:29:42 +0100 Organization: Pushface Message-ID: References: <3CB46975.90408@snafu.de> <3CBAFFEE.2080708@snafu.de> <4519e058.0204171036.6f0a7394@posting.google.com> <3CBDD795.4060706@snafu.de> <4519e058.0204180800.44fac012@posting.google.com> <3CBF0341.8020406@mail.com> <4519e058.0204190529.559a47ae@posting.google.com> <3CC1C6B3.6060306@telepath.com> <3CC21747.5000501@telepath.com> <3CC59ED2.1000803@home.com> <3CC5B286.6FE61551@san.rr.com> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 1019931699 nnrp-10:17589 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 27 Apr 2002 05:29:42 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:23175 Date: 2002-04-27T05:29:42+00:00 List-Id: "Marin David Condic" writes: > O.K. Sounds like we agree. Package 1 defines the interface needed > for an in-memory map with facilities to get them in and out of > streams. Package 2 defines the interface for a disk-based map that > probably doesn't need streams but would need certain file > manipulation capabilities. For the garden variety add/change/delete > and scan kinds of stuff, there doesn't need to be any difference in > the interface presented. But you can't just unplug the one and > substitute the other because of some different requirements. The BCs already do 'Input and 'Output for Maps (and indeed many other container kinds; provided you use GNAT 3.14 or later!). The problem it seems to me with disk-based containers is that you need to think very hard about whether they're limited or not; what does assignment mean for disk-based maps? overwrite, I suppose? Creation is interesting, too. If you say M : Disk_Based_Map; how do you make sure it's associated with a file? ... well, I guess that's easy: procedure Associate (M : in out Disk_Based_Map; With_File_Named : String); and raise an exception (No_Associated_File) if the punter tries to use it before association. I certainly would expect a Disk_Based_Map to be in Abstract_Map'Class (perhaps just because that's the way the BCs do it).