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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Single Extension; Polymorphic Arrays Date: 1999/03/08 Message-ID: <7c1158$e6e$1@plug.news.pipex.net>#1/1 X-Deja-AN: 452631042 References: <7bju1u$q23$1@plug.news.pipex.net> <7bk6gf$6d9$1@plug.news.pipex.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-03-08T00:00:00+00:00 List-Id: Matthew Heaney wrote in message ... [...] |You don't need singleton tasks, or protected objects, or arrays, because |you can use existing mechanism to do the job (ie declare a type, and |then declare one instance of the type). I would certainly agree with the general principle that a language design should strive to provide the facilities it does in as simple and 'orthogonal' (fitting together neatly) a manner as possible, but I disagree with you, quite strongly, on the specific recommendations you seem to be making here. I use (and recommend the use of to my clients) single tasks and arrays all the time (and latterly single protected objects too), and I would consider it a serious pain to have to declare one-time types for them. Surely such type declarations would be confusing, in making the reader feel that they are intended to be used more than once? At the least, they would add extra bulk to the program for no gain (in my opinion). So, I stand by my recommendation to introduce a new 'single record extension' in the next revision of the Ada standard. I think it is simple to understand, and to implement (in terms of an anonymous type), it would not disturb existing code, and it would not have to be used by any programmer who didn't want to. Personally, I think it would solve the "singleton problem" quite neatly, and would be useful to a lot of people. ------------------------------------- Nick Roberts -------------------------------------