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!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Tagged type abuse Date: Thu, 18 Dec 2014 09:59:36 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 18 Dec 2014 16:59:17 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9d3e8459fcff41835e7b68eb9f2a14bb"; logging-data="27965"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iyyhVLUr2rlLoIKbK9HYDEwrcTFSLoKU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: Cancel-Lock: sha1:Sc0lvEiEi1vsDRm6mDunjXe/ITA= Xref: news.eternal-september.org comp.lang.ada:24120 Date: 2014-12-18T09:59:36-07:00 List-Id: On 12/18/2014 04:26 AM, Natasha Kerensikova wrote: > > I find myself using more and more tagged types for reasons that have > nothing to do with tagging, mostly the prefix notations (when it helps > readability and when a function call is conceptually accessing a record > element but with a hidden concrete implementation) and the passing by > reference. > > However, I still feel guilty about it, like I'm abusing a feature > unrelated to what I wish to accomplish. > > What would you recommend to appease such feelings? There are three reasons I use tagged types: 1. To obtain finalization 2. To avoid explicit pointers in self-referential types 3. To obtain Object.Operation notation -- Jeff Carter "If you think you got a nasty taunting this time, you ain't heard nothing yet!" Monty Python and the Holy Grail 23