D3 sumtype api

Sebastiaan Koppe mail at skoppe.eu
Fri Feb 28 22:00:55 UTC 2025


On Friday, 28 February 2025 at 20:15:31 UTC, monkyyy wrote:
> On Friday, 28 February 2025 at 19:28:04 UTC, Sebastiaan Koppe 
> wrote:
>> On Friday, 28 February 2025 at 15:54:54 UTC, monkyyy wrote:
>>> On Friday, 28 February 2025 at 11:33:50 UTC, Dejan Lekic 
>>> wrote:
>>>> It can hold only one value for God's sake...
>>>
>>> a nullable!ubyte has 257 states, its 2 values.
>>
>> Yep. In mir `nullable!t` is just `algebraic!(typeof(null),t)`, 
>> and it makes absolute sense.
>
> Thats 2 types, thats not quite what I mean, I do mean 2 values

I don't understand what you mean with 2 values. `nullable!ubyte` 
has one value which is potentially absent, which is not the same 
as having 2 bytes.

Implementation is free to encode it is 2 bytes of course.


More information about the dip.ideas mailing list