Comment 2 for bug 327537

Revision history for this message
Douglas Katzman (dougk) wrote :

These days, destructuring-bind is 10x less slow than it was > 5 years ago. So at least one motivating factor for wanting up-front checking of the shape of input is eliminated.

Any use-case for claiming that you can improve the situation for, say, a structure slot which is known to be a list of three items:
 (destructuring-bind (x y z) (cube-top-left c)
would have required the slot :type sufficiently obfuscated that I presume nobody would write it that way. User code employing types such as (cons t (cons t (cons t null))) seems rare.

Further, given that cons types can't really be analyzed at compile-time due to mutability of conses, it's not likely to be possible to derive anything about input to the destructuring-bind. So unless expressly stated - which people don't do - there's nothing inferenceable.

The only other possible scenario might be (destructuring-bind (x y) (list a b) ...) where the compiler can actually see the LIST constructor, but why would one write such code as that?

Therefore closing as wont-fix, infeasible.