Discussion Thread: DIP 1042--ProtoObject--Community Review Round 1
jj_1337 at live.dk
Thu Jan 13 17:57:58 UTC 2022
On Thursday, 13 January 2022 at 17:46:49 UTC, Dukc wrote:
> On Tuesday, 11 January 2022 at 06:25:34 UTC, Rumbu wrote:
>> Comparing strings for example can discover invalid unicode
>> characters, why nothrow?
> OTOH you can just just return whatever then. Comparing enums or
> floating points also does not throw if they are invalid. If you
> want to provide a throwing variant you can, if you call it
> something else than `cmp`.
>> Comparing timestamps may need reading the current time zone,
>> why pure?
> Badly designed class, if. The timezone info ought to be already
> in the stamps when comparing.
Basically what you said, as the sane thing is working with pure
UTC and just offsetting it by the timezone and only actually
accounting for timezone when you need to display the time to some
More information about the Digitalmars-d