[m-rev.] for review: delete see/seen/tell/told from io.m

Peter Wang novalazy at gmail.com
Mon Apr 4 14:29:04 AEST 2022


On Wed, 30 Mar 2022 01:01:38 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 2: I *guess* that the read-only version will be more popular than the
> writeable version, so I think it is more important to keep *its* name short.
> Some possibilities:
> 
> - byte_array
> - byte_vector
> - bytes
> - blob
> 
> None are perfect. The first falsely implies writeability, the second makes
> it sound like one slice of a byte matrix, bytes is not precise enough, and
> blob is meaningful only to people who know the term from other contexts.
> Overall, my preferece is for  byte_array, but it is a weak preference.
> 
> For the writeable version, I would add a "mutable_" prefix to whatever
> name we end up with for the read-only version.

I think "byte_array" is better suited to the mutable type as it matches
the other array types in the standard library.

FWIW, in my own project I have "byte_array" type, which is mutable.
In Prince, there is a mutable "byte_array" type and a readonly "bytes"
type (I did not name them).

"Vector" is common in other languages without implying any relation to a
matrix type. But Mercury already uses "array" in the standard library.

For the readonly type, here are a few more (not great) suggestions:

- ro_byte_array
- byte_string
- byte_sequence ??

I weakly prefer "bytes" though.

Peter


More information about the reviews mailing list