splint 1.2.2 and 1.2.3 and 1.2.4
oops, forgot to post in here about these (not that anyone on cohost uses splint :eggbug-sob:)
1.2.2 big changes:
- Differentiate between
&&.rest args and parsed lists in:on-matchhandlers by attaching:noahtheduke.spat.pattern/restmetadata to bound rest args.- Allows us to write patterns that reuse the same binding var in single element and rest args positions:
(if ?x ?y nil)and(if ?x (do &&. ?y) nil)differentiate?ywith the above metadata.
- Allows us to write patterns that reuse the same binding var in single element and rest args positions:
1.2.3 big changes:
- Fix
lint/fn-wrapperfalse positive on interop.- Clojure is silly and doesn't treat static methods as function calls unless they're in function position. For example,
(map Integer/parseInt ["1" "2" "3"])crashes becauseInteger/parseIntis treated as a static field. You have to write#(Integer/parseInt %)to get the Clojure compiler to understand what you mean. This should not be a splint warning, so to handle it, I'm parsing all imports and attachingspat/imported-nsmetadata to the parsed symbol when it applies, and then checking that metadata in thelint/fn-wrapper:on-matchfunction and also checking the built-in list of imports. This should cover the vast majority of cases, and any other cases are silly and shouldn't be written DUH.
- Clojure is silly and doesn't treat static methods as function calls unless they're in function position. For example,
- Various performance improvements:
- Switched a bunch of internal sequence processing from lazy to eager, gaining a non-zero amount of speed from not having to juggle the seq stuff.
- Changed
simple-typeto use protocols instead of a bigcondwhich improves speed quite a bit. Removes a whole lot of function calls, and lowers calls on complex types (lists, sets, vectors, and maps) from 90+ ms to 5ms. Small but important when we're callingsimple-typeon every single element and sub-element in every file. - Switched the binding atom to be a
volatile!, because there's no cross-thread sharing of pattern execution. - Use interop directly in a couple places to avoid expensive if-thens in the Clojure runtime.
1.2.4
- Immediately released to fix a small bug/fuck up in 1.2.3 lmao owned
⁂
Liked the post? Hated the post? Felt nothing whatsoever about the post?
Email me, and let me know!