comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Discriminants or Constructor Function for Limited Types
Date: Thu, 5 May 2022 08:56:50 +0200	[thread overview]
Message-ID: <t4vsfi$jtb$1@gioia.aioe.org> (raw)
In-Reply-To: t4v3f0$lgb$1@dont-email.me

On 2022-05-05 01:49, Randy Brukardt wrote:

> Those cases that you worry are "unsafe" seem to me to only occur because of
> "hacks and workarounds". There's no good reason to do any of those things
> intentionally unless you are using a "hack" to do something dubious in the
> first place.

Is a task component a hack? Well so long there is no tagged task types 
aggregation is the only way.

Controlled types are hacks, yes, but there is no alternative. You admit 
that all tagged types (and I would say all types) should be controlled = 
support user-defined initialization hooks.

Dispatching from Initialize is a double hack, but again, if you need it, 
the alternative, client-side manual initialization is way worse.

Exception propagation upon initialization? There is no enforceable 
exception contracts to fight it.

So I say, if hacks occur, then because of the language problems, not 
only because some lazy programmer does something stupid.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2022-05-05  6:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04  9:02 Discriminants or Constructor Function for Limited Types R R
2022-05-04  9:40 ` Jeffrey R.Carter
2022-05-04  9:47 ` Dmitry A. Kazakov
2022-05-04 23:49   ` Randy Brukardt
2022-05-05  6:56     ` Dmitry A. Kazakov [this message]
2022-05-06  1:53       ` Randy Brukardt
2022-05-06  8:48         ` Dmitry A. Kazakov
2022-05-07  3:26           ` Randy Brukardt
2022-05-07 14:55             ` Dmitry A. Kazakov
2022-05-08  2:32               ` Randy Brukardt
2022-05-08  8:37                 ` Dmitry A. Kazakov
2022-05-08 17:19                   ` Doctor Who
2022-05-08 18:00                     ` Dmitry A. Kazakov
2022-05-08 18:07                       ` Doctor Who
2022-05-09  8:52                       ` Niklas Holsti
2022-05-09  9:45                         ` Dmitry A. Kazakov
2022-05-09 10:19                       ` Doctor Who
2022-05-09 11:15                         ` Dmitry A. Kazakov
2022-05-09 12:05                           ` Doctor Who
2022-05-09 12:31                             ` Dmitry A. Kazakov
2022-05-10  4:48                   ` Randy Brukardt
2022-05-10  6:18                     ` Dmitry A. Kazakov
2022-05-04 15:05 ` AdaMagica
2022-05-05  9:59 ` R R
replies disabled

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