How to implement filterMap
Alexandru Ermicioi
alexandru.ermicioi at gmail.com
Sun Dec 31 14:47:27 UTC 2023
On Sunday, 31 December 2023 at 09:47:27 UTC, Siarhei Siamashka
wrote:
> Also take a look at the `c` array. The handling of arithmetic
> overflows is a safety problem of the D language design. Certain
> types of input may cause overflows, which result in producing
> bogus data as a result of running your program and are very
> difficult to troubleshoot. The use of the GDC's `-ftrapv`
> option surely helps in troubleshooting such cases, but some
> software or D libraries may intentionally rely on the D's
> arithmetic wraparound feature.
`CheckedInt` should be another solution for overflows, if you
really need it to throw exceptions, on overflow errors.
More information about the Digitalmars-d-learn
mailing list