Readit News logoReadit News
hchja commented on Lossless LLM compression for efficient GPU inference via dynamic-length float   arxiv.org/abs/2504.11651... · Posted by u/CharlesW
hchja · 4 months ago
This is pretty useless in any case that doesn’t involve BFloat16 models
hchja commented on API design note: Beware of adding an "Other" enum value   devblogs.microsoft.com/ol... · Posted by u/luu
remram · 6 months ago
Rust has the "non_exhaustive" attribute that lets you declare that an enum might get more fields in the future. In practice that means that when you match on an enum value, you have to add a default case. It's like a "other" field in the enum except you can't reference it directly, you use a default case.

IIRC a secret 'other' field (or '__non_exhaustive' or something) is actually how we did thing before non_exhaustive was introduced.

hchja · 6 months ago
This is why language syntax is so important.

Swift allows a ‘default’ enum case which is similar to other but you should use it with caution.

It’s better to not use it unless you’re 110% sure that there will not be additional enums added in the future.

Otherwise, in Swift when you add an additional enum case, the code where you use the enum will not work unless you handle each enum occurrence at it’s respective call site.

Dead Comment

u/hchja

KarmaCake day1March 2, 2025View Original