[m-rev.] for review: delete see/seen/tell/told from io.m
Julien Fischer
jfischer at opturion.com
Tue Mar 8 13:26:26 AEDT 2022
On Tue, 8 Mar 2022, Zoltan Somogyi wrote:
> 2022-03-08 13:13 GMT+11:00 "Julien Fischer" <jfischer at opturion.com>:
>> As an aside: the bitmap type has always been a bit awkward; it serves
>> two roles, first as compact implementation of map(int, bool) and second
>> as a container for binary data. The fact that its API allows for
>> partial final bytes is not a natural fit for the second role. (I raise
>> this because the type class instances are mostly concerned with the
>> second role.)
>>
>> I think we might do better if we introduce two new types for holding
>> binary data, essentially equivalent to an array of uint8 (at the target
>> language level). There would be two, because we would have an immutable
>> read-only version and a mutable version.
>
> I am not putting my hand up for that one.
I'm happy enough to implement them. The two things I need from this
list are:
1. Agreement that this is what we want to do.
2. Suggestions for names for the new types.
>>> Also, I noticed that in io.m, the abstract and concrete instance declarations
>>> are not in the same order. I intend to put them into the same order;
>>> this should reveal whether there are any more intentionally unexported
>>> instances.
>>
>> A possibly useful addition to the compiler might be to have a new
>> warning (disabled by default) that checks for non-exported type class
>> instances whose argument vectors contain only non-local types.
>
> Ok, I will look into that. I was already considering an equivalent of
> decl vs defn order warnings for instances.
That is also a good idea.
Julien.
More information about the reviews
mailing list