all OS functions should be "nothrow @trusted @nogc"
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 26 10:43:43 PDT 2017
On 7/26/2017 3:14 AM, Timon Gehr wrote:
> On 26.07.2017 05:02, Walter Bright wrote:
>> The implementation checks for fp being NULL and returns EOF if it is.
>
> The C mindset is that this check is a waste of precious processing resources and
> morally wrong, as only a fool would pass NULL anyway, and fools deserve to get UB.
I wrote that code 30+ years ago, and no longer remember why I put the null check
in. It might have been because other C compiler libraries did it.
More information about the Digitalmars-d
mailing list