comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Tagged type abuse
Date: Thu, 18 Dec 2014 09:59:36 -0700
Date: 2014-12-18T09:59:36-07:00	[thread overview]
Message-ID: <m6v154$r9t$1@dont-email.me> (raw)
In-Reply-To: <slrnm95egb.nrc.lithiumcat@nat.rebma.instinctive.eu>

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

  parent reply	other threads:[~2014-12-18 16:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 11:26 Tagged type abuse Natasha Kerensikova
2014-12-18 13:01 ` Dmitry A. Kazakov
2014-12-18 16:59 ` Jeffrey Carter [this message]
2014-12-18 23:10   ` Randy Brukardt
2014-12-19 12:42     ` Michael B.
2014-12-20  0:07       ` Randy Brukardt
2014-12-20 12:39         ` Michael B.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox