clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
2019-11-01T00:00:10.206100Z

No kidding, I thought it just made it easier to maintain the expression semantics

bronsa 2019-11-01T00:01:28.207600Z

there's some situations where some more complex form of local indexing is required e.g within loops/try blocks and Compiler. java doesn't do that

bronsa 2019-11-01T00:01:54.208500Z

so if you don't hoist in those contexts you'd get multiple locals reusing the same slot

bronsa 2019-11-01T00:02:28.209500Z

but it's doable otherwise, the mutabilify in compiler. java doesn't make it trivial tho

bronsa 2019-11-01T00:03:17.210Z

I got kinda there in 2015 but gave up

bronsa 2019-11-01T00:04:57.211800Z

there are also potential performance implications of hoisting loops that at some point made it easier for C2 to inline stuff, but not sure if that's still a thing in modern jvms

bronsa 2019-11-01T00:05:51.212600Z

but again the hoisting patch using methods would have the same characteristics here

bronsa 2019-11-01T00:08:18.214500Z

but as far as I remember from looking at the commit history the hoisting was introduced to fix the (accidental?) local slot reuse in the buggy cases, not due to this perf implication

bronsa 2019-11-01T00:12:35.215400Z

there was a bug recently where this was still happening and the workaround was to lift more contexts

mpenet 2019-11-01T08:17:51.216300Z

clojurescript has no requiring-resolve ? is that something not feasible?

alexmiller 2019-11-01T13:37:18.217300Z

prob a better question for #cljs-dev (but I suspect the answer is no)

dominicm 2019-11-01T15:18:17.217500Z

I asked, not easily

dominicm 2019-11-01T15:18:45.217700Z

I ended up having to add a code based api for my use case to allow for it