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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Type naming conventions: Any_Foo Date: Thu, 5 Dec 2019 22:51:36 +0100 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 3d73Ybk3C5U4I2t8lv+lAQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57663 Date: 2019-12-05T22:51:36+01:00 List-Id: On 2019-12-05 21:03, Jeffrey R. Carter wrote: > On 12/5/19 6:45 PM, Dmitry A. Kazakov wrote: >> >> 1. Formal generic types. They are customarily named XXX_Type. > > Well chosen names for generic formal types do not end with _Type. The > PragmAda Reusable Components have many generic formal types, none of > which end with _Type. Ada standard library uses _Type, e.g. generic type Element_Type (<>) is private; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Indefinite_Holders As I said, the rationale is that there is no meaningful name for Element_Type in the problem space. There is no problem space at all. Indefinite_Holders is a helper package so general that considered in isolation it has no meaning. >>        -- I don't want access type, I am required to have it > > Please provide examples of being required to have an access type. There are lots of cases in Ada, you certainly should know that. As a practical example GtkAda declares all widget types twice: type Gtk_Button_Record is ... type Gtk_Button is access all Gtk_Button_Record'Class; The suffix _Record is an equivalent to _Type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de