Fork me on GitHub
#cljs-dev
<
2019-05-27
>
roman01la12:05:01

Curious why (ctx.my.method) emits ctx.my.method.call(null); (with .call part), but (.my.method ctx) results in cljs.user.ctx.my.method(); (direct call) ?

thheller12:05:58

(.foo ...) uses the special :host-call AST op while (ctx.foo) is just a hacky patch in resolve-var so it'll go through the normal :invoke path

thheller13:05:08

arguably (ctx.my.method) is invalid code but too late to change it

roman01la13:05:28

Good to know, thanks!

thheller13:05:48

(ctx.my.method) is basically ((.. ctx -my -method))