From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!8nKyDL3nVTTIdBB8axZhRA.user.46.165.242.75.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: String Buffer Date: Thu, 02 Dec 2021 20:51:30 +0000 Organization: Aioe.org NNTP Server Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: gioia.aioe.org; logging-data="36604"; posting-host="8nKyDL3nVTTIdBB8axZhRA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cancel-Lock: sha1:PaHsoWTTx0ubL2dKou60wg+r0Iw= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:63191 List-Id: Kevin Chadwick writes: > In Go they have strings.Builder. I assume that is what Text_Buffer is > aimed to be. (Actually Go seems to have copied a lot from Ada such as > AWS API, unless they both are similar to something else like JAVA). > > Is Text_Buffer usable today with GCC 11? If you mean Universal Text Buffers, no. There is Ada.Strings.Text_Output, but it looks as though that's actually an internal package to support T'Put_Image - so probably best avoided. GCC 12 has universal text buffers. But I don't see that Ada.Strings.Text_Buffers.Unbounded is going to be any more or less efficient than Unbounded_Strings? I seem to remember that AdaCore made considerable performance improvements to Unbounded_Strings, for example copy-on-write sharing.