squint

lread 2025-08-05T02:55:54.736919Z

I'm trying out squint's (warn-on-lazy-reusage!). I put one at the top of each source - like I would for (set! *warn-on-reflection* true) in clojure sources. Bad idea? Perf impact? I assumed (wrongly) that I would see warnings at compile time, but instead I happened to notice warnings logged to my browser console at runtime. Anyhoo, happy to update the squint README on this topic when I learn a bit more about it.

lread 2025-08-05T10:07:09.479349Z

Thanks! Q: should this only be used in dev or is it ok to leave in for production?

borkdude 2025-08-05T10:07:34.516969Z

good question, let me check

borkdude 2025-08-05T10:08:57.130979Z

it's fine to do it in production as there is no to little overhead. on the other hand lazy re-usage isn't incorrect, it's just slower since things will be re-calculated. so you might have an error in production that could just be an unoptimal but correct behavior

borkdude 2025-08-05T10:09:46.108709Z

oh it's just logging. this is weird code: https://github.com/squint-cljs/squint/blob/76e57aea3a870181b6ec89e6f1e43eba5bc90400/src/squint/core.js#L695-L698

borkdude 2025-08-05T10:09:54.000379Z

it throws and then immediately catches it.. weird :)

borkdude 2025-08-05T10:10:11.510889Z

oh it's because of the stack

lread 2025-08-05T10:22:55.660809Z

Cool, tx, that’s enough info for my PR.

🙏 1
borkdude 2025-08-05T06:50:45.993419Z

PR welcome!