> RE@jhpratt Well that’s the proposal. In case there’s a confusion with “lifetime”. What I meant was that as far as garbage collector is concerned, persistent variables live as long as the function is referenced somewhere (unlike anonymous functions)
Also revisiting your idea of using static properties instead, how’d you imagine static props on methods of classes considering the fact that stuff should “live” where it “belongs” and not “leak” out unnecessarily, imagine this: ```javascript class DBService { foo(uri) { persist const httpRE = /^https?/; persist let counter = 0; return 0; } ``` In the example above it is given that no other method in `DBService` class uses, or has anything to with `counter` “inside” of `DBService#foo`. So “leaking” it out is unnecessary
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss