[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should records be able to mimic primitive types?
From: |
Stefan Monnier |
Subject: |
Re: Should records be able to mimic primitive types? |
Date: |
Mon, 12 Jun 2017 13:47:52 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>> The reason why I disagree with them is because they are too costly
>> compared to the likelihood they'll ever help catch a bug
> That'd be in the "defenses are too expensive" department, right?
Right. I just wanted to clarify that "expensive" is a relative notion:
in the case under discussion, the extra check is just a single `memq`
test on a fairly short list, so it's pretty cheap in itself; the only
reason why I find it too expensive is that the expected gain is just
extremely small.
Stefan