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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Wed, 23 Apr 2014 17:46:04 +0200 Organization: A noiseless patient Spider Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 23 Apr 2014 15:46:01 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="23dab0694e4174fdc880833ec67fa650"; logging-data="26258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JmLhwplljr8pS4FzJI5Yx" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:OmoWit66n1wYyYjhGlJHh5vzCM0= X-Enigmail-Version: 1.6 Xref: news.eternal-september.org comp.lang.ada:19530 Date: 2014-04-23T17:46:04+02:00 List-Id: Le 23/04/2014 16:38, Dmitry A. Kazakov a écrit : >> And what is the benefit over writing: >> > Put_Line (F_T2_Image (V2)); >> > ? > generic > type T is private; > package Foo is ... > > package body Foo is > procedure Bar (X : T) is > begin > ... X'Img ... > > That is the only use case for an attribute, in absence of primitive > operations of course. But that would require every type to have a 'Img. Yes, you said you wanted that, but there are clearly types where no sensible image could be provided. Of course, you can always provide non-sensible strings... -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr