Recognize inefficient uses of APPLY
Bug #1946404 reported by
Douglas Katzman
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
Certain unidiomatic patterns should be recognized as poor style, and produce a warning, or have the compiler just transform the code to something better, or maybe even do both of those.
(apply #'list (some-list)) --> (copy-list (some-list))
(apply #'vector (some-list)) --> (coerce (some-list) 'vector)
(apply #'+ (some-sequence)) --> (reduce #'+ (some-sequence))
(apply #'values (some-list)) --> (values-list (some-list))
To post a comment you must log in.