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!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Why doesn't Ada allow user-defined attributes? Date: Thu, 20 Jul 2017 09:34:52 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 20 Jul 2017 09:34:52 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="f02124dd6885986c3c1281571606adfc"; logging-data="23810"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188ho/hAM+gofqq15091wgmCxQBt5Lw4dY=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:5FB0biQVojk+ClYRSdCiuVCnA50= Xref: news.eternal-september.org comp.lang.ada:47460 Date: 2017-07-20T09:34:52+00:00 List-Id: On Wed, 19 Jul 2017 17:02:35 -0700, Shark8 wrote: > While reading up on VHDL I found out about its user-defined attributes > and got to wondering why Ada doesn't have them. I can see how > restricting them to those defined in the standard can keep the code > "clean" and certainly [mostly] uniform... though the allowance of > implementation-defined attributes undermines the last portion of that > argument. -- Does anyone know? What would they be used for? Apart from Read and Write attributes for streaming objects, which are user ... overrideable, rather than defineable. In VHDL, user defined attributes don't normally affect the design in any tangible way, they are normally used to pass information to tools, such as synthesis or backend tools, for purposes outside the language's remit (such as setting voltage standards on I/O pins). Offhand I'm not sure I can see similar purposes for extending Ada's attributes. Got any use cases in mind? -- Brian