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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c63aa81a67eceb8f X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Ragged Array Proposal Date: 1999/09/23 Message-ID: <37EA9A72.594ED8F5@mitre.org>#1/1 X-Deja-AN: 528799247 Content-Transfer-Encoding: 7bit References: <37e7c08e@eeyore.callnetuk.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 938121557 679 129.83.41.77 (23 Sep 1999 21:19:17 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 NNTP-Posting-Date: 23 Sep 1999 21:19:17 GMT Newsgroups: comp.lang.ada Date: 1999-09-23T21:19:17+00:00 List-Id: Nick Roberts wrote: > I seem to get the impression that the cognoscenti consider this particular > idea worthless. I am perfectly serious about it, however; I am completely > convinced that it would be both workable and valuable (extremely so, in > fact). I beseech anyone who might be interested to take a serious look; I > would be delighted to have feedback (_any_ kind of feedback), either to me > by e-mail or to this newsgroup. Not worthless, just excessive. There are already two ways to do what you seem to want: arrays of Ada.Strings.Unbounded.Unbounded_String, or a generic package that does what you want using Controlled types. If you want to supply a package like that it would probably be considered, if not for the next standard, at least to be provided by all implementors. (And if you do it before the ARG meeting Monday, it might even get considered there...) Note: I have implemented a slightly more general version of that package, where my major concern was to provide extensible records. Hmmm. What you want seems to be a generic package with a specification like: with Ada.Finalization; generic type Index is (<>); package Ragged is type Element is private with null; type Element_Reference is access all Element'Class; type Ragged_Array is array (Index range <>) of Element_Reference; procedure Assign_To(R: in out Ragged_Array; I: in Index, E: Element); function Dereference(R: Ragged_Array; I: Index) return Element'Class; private -- implemenation defined... end Ragged; Any comments? -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...