[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should records be able to mimic primitive types?
From: |
Eli Zaretskii |
Subject: |
Re: Should records be able to mimic primitive types? |
Date: |
Mon, 12 Jun 2017 20:22:43 +0300 |
> From: Stefan Monnier <address@hidden>
> Date: Mon, 12 Jun 2017 13:15:35 -0400
>
> > If some usage is unequivocally wrong, can never support legitimate use
> > cases, and the defenses are not too expensive, then I think this could
> > be okay. But we need to be careful not to disallow legitimate, though
> > perhaps somewhat dangerous practices. Emacs's tradition is to trust
> > the Lisp programmers not to shoot themselves in the foot, so we
> > generally prefer to err on that side of the line, when in doubt.
> > Punishing the innocent on behalf of possibly guilty is something I
> > think we should try to avoid.
>
> I think the kind of added checks he's thinking of are "safe" in
> this respect.
>
> 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?
> We generally don't check every imaginable meaningless circumstance, but
> only those that we've found to occur often enough to warrant the runtime
> and maintenance cost of an extra test.
Right.