comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: why "unconstrained subtype in component declaration" while said component given default value ?
Date: Sun, 27 May 2018 10:22:45 -0700 (PDT)
Date: 2018-05-27T10:22:45-07:00	[thread overview]
Message-ID: <f757f06c-6aa3-4d96-a592-e13907e46a1f@googlegroups.com> (raw)
In-Reply-To: <lyy3g5efvs.fsf@pushface.org>

On Sunday, May 27, 2018 at 1:07:08 AM UTC-6, Simon Wright wrote:
> 
> The Booch Components originally had the maximum length of a bounded
> container fixed at generic instantiation, which is a very limiting
> design.

I can see the merits for it though.
  Package Small_Stack is new Stack(Element => Integer, Maximum => 2**4);
  Package Large_Stack is new Stack(Element => Integer, Maximum => 2**10);

  LS : Large_Stack.Stack;
  SS : Small_Stack.Stack;

These /should/ be different and incompatible types 98% of the time; the times they shouldn't are usually some form of low-level work OR some form of generic-thinking in a dynamic environment... and the last one is solvable w/ tagged-type/interface versions.

  reply	other threads:[~2018-05-27 17:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26 21:03 why "unconstrained subtype in component declaration" while said component given default value ? Mehdi Saada
2018-05-26 21:40 ` Jere
2018-05-26 22:11   ` Mehdi Saada
2018-05-26 23:55     ` Jere
2018-05-27  0:14       ` Jere
2018-05-27  0:29       ` Mehdi Saada
2018-05-27  0:45         ` Mehdi Saada
2018-05-27 17:15         ` Shark8
2018-05-27 17:30           ` AdaMagica
2018-05-27 18:17             ` Shark8
2018-05-29  1:28               ` AdaMagica
2018-05-29 17:20                 ` Mehdi Saada
2018-05-27  7:45   ` Jeffrey R. Carter
2018-05-26 23:41 ` Shark8
2018-05-27  7:07 ` Simon Wright
2018-05-27 17:22   ` Shark8 [this message]
2018-05-27 12:24 ` Mehdi Saada
2018-05-29 22:28   ` Randy Brukardt
replies disabled

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