From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.52.68 with SMTP id b65mr1240462ioa.100.1474609830954; Thu, 22 Sep 2016 22:50:30 -0700 (PDT) X-Received: by 10.157.43.242 with SMTP id u105mr459338ota.17.1474609830918; Thu, 22 Sep 2016 22:50:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!x192no3485319itb.0!news-out.google.com!w143ni9917itb.0!nntp.google.com!u18no3357008ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 Sep 2016 22:50:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.225.80.105; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 165.225.80.105 References: <11ee98f5-d373-4c72-8562-c310cc76817d@googlegroups.com> <177d0054-2925-42d5-afba-f013dc7db4e2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <625e3d31-1a45-4308-8122-e7ccac0b3e13@googlegroups.com> Subject: Re: Question on bounded / unbounded strings From: Maciej Sobczak Injection-Date: Fri, 23 Sep 2016 05:50:30 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31856 Date: 2016-09-22T22:50:30-07:00 List-Id: > > Yes, I have used char[N] in "other languages" on various occasions. > > These are bounded strings. >=20 > How char[N] is? It has bounds. > It is compatible with char[M]. Then it is unbounded, right? An array of characters with known bounds is a bounded string. This abstract= concept might have different incarnations depending on the target language= . > No. Splitting is an operation resulting in a set of strings Yes. Alternatively, it might be a sequence. > as a=20 > compound object. This is an arbitrary and unsubstantiated constraint. > Scanning does not produce such objects, though it could=20 > if necessary. The point is that this object is almost never necessary. It might be necessary in a more complete string-processing library, where o= ther operations expect such an object as input. In other library with diffe= rent API (based on iterators or generators or whatever) it might not be nee= ded. Still, splitting as an abstract concept is the same. > > And no, I would rather store them in a job queue. >=20 > Job queue is not a set of strings. You are mixing concepts (even the ones which you have arbitrarily introduce= d). A set of strings is a result or splitting. Job queue is where I might want = to put them. Whether the boundary between these two expects the set as a si= ngle object is a matter of interface design. Still, splitting the string an= d putting its tokens in a job queue is a design-level concept that holds in= dependently on how you implement it. > >> Not if substrings get processed, > > > > Yes if they are not processed. >=20 > They are, as you said, the result is a job queue not a set of strings. Again, mixing your own concepts. > > Please do not invent artificial argument extensions only to "prove" you= r point. >=20 > Just defining terms. If you consider scanning, translating, etc same as= =20 > tokenizing because the application in the end does the same, there is=20 > nothing to discuss. As I have already pointed, sometimes there is no added value from disagreem= ents. > Then Ada is C and C is Ada. Interesting implication, but without added value. > > No, the result of splitting has a real value of its own. Get the > > spreadsheet and split it into individual cells - they are still real > > values. They might even be still useful in another spreadsheet. >=20 > String is not spreadsheet and conversely. I have only tried to visualize my argument. > > Nope. Stream is a high-level I/O abstraction that is not needed > > here. >=20 > You argue for a poor implementation (Unbounded_String) of this abstractio= n. The implementation is just right, as this is also what I need as the result= , for example in order to do something with it (store in the database?). I = don't need the stream here, it is not the intended result and would need to= be abandoned after extracting the actual result. > Yes, "Append" could implements stream's "Write". So what? So it is useful, because it does not introduce other entities. Sorry Dmitry, but I don't think that this discussion is interesting for any= body else here. --=20 Maciej Sobczak * http://www.inspirel.com