Re: [EXTERNAL] Proposal adaptation request

This discussion is simultaneously hilarious and horrifying, but by all means go ahead and store an extensible list of layered encoding names as an enumerated union type singleton because you are afraid of receiving traffic tickets for a valid but unregistered known content-coding named "_" that might be misinterpreted as an unknown content-coding within a PerformanceResourceTiming API that has no need for this information anyway.

I've got plenty of popcorn.

.....Roy

> On May 14, 2025, at 5:05 PM, Martin Thomson <mt@lowentropy.net> wrote:
> 
> If you want a longer form of Seph's comment: https://educatedguesswork.org/posts/text-type-safety/
> 
> The section "NO PLATE" is simultaneously hilarious and horrifying.
> 
> "_" is "NO PLATE".

> 
> On Thu, May 15, 2025, at 07:16, Seph Gentle wrote:
>> All of these answers seem like a bad design to me. It sounds like what 
>> you want is this:
>> 
>> enum ContentEncoding {
>>  Known(string),
>>  Unknown,
>>  NotPresent
>> }
>> 
>> Using a sentinal value for “none” / null is Hoare’s billion dollar 
>> mistake. An unrecognised content encoding isn’t a type of content 
>> encoding at all. If you ask me, it shouldn’t be treated or stored as 
>> such.
>> 
>> This design uses sum types - which means it isn’t always practical with 
>> modern databases and programming languages. I think I’ll never 
>> understand why languages like sql, c++ and go are missing sum types.
>> 
>> -Seph
> 

Received on Thursday, 15 May 2025 04:09:42 UTC