comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Warning: Storage error
Date: Sat, 09 Aug 2014 09:46:35 -0700
Date: 2014-08-09T09:46:35-07:00	[thread overview]
Message-ID: <ls5j9b$h3l$1@dont-email.me> (raw)
In-Reply-To: <14vvtor6816au.15qbbqi9jjpfk$.dlg@40tude.net>

On 08/09/2014 09:26 AM, Dmitry A. Kazakov wrote:
>
> Ada.Strings.Bounded is practically unusable. Unbounded_String offers no
> advantage over custom type because it requires explicit conversion to
> String, and is suspicious for allocating more memory in advance than
> actually required. RM is silent about the memory usage strategy.

I agree that Ada.Strings.Bounded has a poor interface. I rarely use it. But when 
I do need bounded strings, I find the advantages of reuse usually outweight the 
disadvantages of the poor interface.

Using the standard library has the advantages of being more likely to be 
correct, requiring less development effort, and being easier for future readers 
to understand.

If you're worried about the implementation of an abstraction in the standard 
library in absence of any evidence that it is responsible for being unable to 
meet your requirements then you probably shouldn't be using Ada. Ada (and 
software engineering) is largely about abstraction and not worrying about 
implementations unless one has to.

-- 
Jeff Carter
"Insufficient laughter--that's grounds for divorce."
Play It Again, Sam
126

  reply	other threads:[~2014-08-09 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-09 15:20 Warning: Storage error Victor Porton
2014-08-09 16:07 ` anon
2014-08-09 16:08 ` Jeffrey Carter
2014-08-09 16:26   ` Dmitry A. Kazakov
2014-08-09 16:46     ` Jeffrey Carter [this message]
2014-08-09 16:57       ` Dmitry A. Kazakov
2014-08-09 16:21 ` Dmitry A. Kazakov
replies disabled

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