Discussion Thread: DIP 1042--ProtoObject--Community Review Round 1
Dukc
ajieskola at gmail.com
Thu Jan 13 17:46:49 UTC 2022
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.
More information about the Digitalmars-d
mailing list