comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Question on bounded / unbounded strings
Date: Thu, 22 Sep 2016 22:50:30 -0700 (PDT)
Date: 2016-09-22T22:50:30-07:00	[thread overview]
Message-ID: <625e3d31-1a45-4308-8122-e7ccac0b3e13@googlegroups.com> (raw)
In-Reply-To: <ns13fg$1r9r$1@gioia.aioe.org>


> > Yes, I have used char[N] in "other languages" on various occasions.
> > These are bounded strings.
> 
> 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 
> compound object.

This is an arbitrary and unsubstantiated constraint.

> Scanning does not produce such objects, though it could 
> if necessary. The point is that this object is almost never necessary.

It might be necessary in a more complete string-processing library, where other operations expect such an object as input. In other library with different API (based on iterators or generators or whatever) it might not be needed. Still, splitting as an abstract concept is the same.

> > And no, I would rather store them in a job queue.
> 
> Job queue is not a set of strings.

You are mixing concepts (even the ones which you have arbitrarily introduced).
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 single object is a matter of interface design. Still, splitting the string and putting its tokens in a job queue is a design-level concept that holds independently on how you implement it.

> >> Not if substrings get processed,
> >
> > Yes if they are not processed.
> 
> 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" your point.
> 
> Just defining terms. If you consider scanning, translating, etc same as 
> tokenizing because the application in the end does the same, there is 
> nothing to discuss.

As I have already pointed, sometimes there is no added value from disagreements.

> 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.
> 
> 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.
> 
> You argue for a poor implementation (Unbounded_String) of this abstraction.

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 anybody else here.

-- 
Maciej Sobczak * http://www.inspirel.com

  reply	other threads:[~2016-09-23  5:50 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  8:46 Question on bounded / unbounded strings Arie van Wingerden
2016-09-13  9:04 ` Dmitry A. Kazakov
2016-09-22  2:10   ` John Smith
2016-09-22  7:24     ` Dmitry A. Kazakov
2016-09-22  9:01       ` J-P. Rosen
2016-09-22  9:53         ` Dmitry A. Kazakov
2016-09-22 10:58           ` G.B.
2016-09-22 12:05             ` Dmitry A. Kazakov
2016-09-22 14:14               ` G.B.
2016-09-22 17:18                 ` Dmitry A. Kazakov
2016-09-22 11:08           ` J-P. Rosen
2016-09-22 12:05             ` Dmitry A. Kazakov
2016-09-22 13:18           ` Maciej Sobczak
2016-09-22 13:52             ` Dmitry A. Kazakov
2016-09-22 14:51               ` Maciej Sobczak
2016-09-22 17:13                 ` Dmitry A. Kazakov
2016-09-23  5:50                   ` Maciej Sobczak [this message]
2016-09-23  6:36                     ` Simon Wright
2016-09-23  7:48                       ` Dmitry A. Kazakov
2016-09-28 20:55                     ` Randy Brukardt
2016-09-23 23:58       ` John Smith
2016-09-24  7:52         ` Dmitry A. Kazakov
2016-09-24 16:25           ` John Smith
2016-09-24 17:44             ` Dmitry A. Kazakov
2016-09-24 18:33               ` John Smith
2016-09-24 18:37               ` John Smith
2016-09-24 18:59               ` John Smith
2016-09-25  8:50                 ` Dmitry A. Kazakov
2016-09-25 23:35                   ` brbarkstrom
2016-09-26  7:28                     ` Dmitry A. Kazakov
2016-09-26 12:39                       ` brbarkstrom
2016-09-28 21:09             ` Randy Brukardt
2016-09-30  7:59               ` Björn Lundin
2016-09-13  9:35 ` gautier_niouzes
2016-09-13 10:41 ` Alejandro R. Mosteo
2016-09-13 17:41 ` Jeffrey R. Carter
2016-09-13 17:59 ` Björn Lundin
2016-09-14 11:23 ` Arie van Wingerden
2016-09-14 12:26   ` Arie van Wingerden
2016-09-14 12:28   ` Arie van Wingerden
2016-09-14 12:57 ` Arie van Wingerden
2016-09-14 19:39   ` Jeffrey R. Carter
2016-09-17 16:35     ` Arie van Wingerden
2016-09-16 14:43 ` Olivier Henley
2016-09-17 16:35   ` Arie van Wingerden
replies disabled

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