[OT] OT: Null checks.
Timon Gehr
timon.gehr at gmx.ch
Tue May 6 04:01:20 UTC 2025
On 5/6/25 03:46, Walter Bright wrote:
> On 5/5/2025 7:10 AM, Kagamin wrote:
>> On Monday, 5 May 2025 at 13:45:49 UTC, Timon Gehr wrote:
>>> https://github.com/dlang/dmd/commit/
>>> dda88738b2b391239c87cfdbd60b76d6025306e5
>>
>> just revert
>
> Check the PR for it first for the reason why.
https://github.com/dlang/druntime/pull/2794
From that PR discussion:
> > @WalterBright: Error and assert() do the same thing, we should just use one method. I'd like to eventually deprecate Error.
>
> @Geod24: No they don't. First, we have checkaction to change the behavior. Second, in release mode (and we distribute druntime / phobos in release mode), the assert you are putting lead to a HLT, without error message, while throw new Error will lead to sensible error messages.
It seems there were multiple PRs like this one at the time, consistent
with my perception that this is a pervasive issue.
More information about the Digitalmars-d
mailing list