Closed fasterthanlime closed 9 years ago
And not the reverse. Let's take this:
(-> js/window (.' :document) nil? not))
If you macro-expand from the outside in, first you get:
(not (nil? (.' js/window :document)))
And then .' can expand correctly (that's the macro from Reagent, by the way)
.'
(not (nil? (aget js/window "document")))
And everything is fine with the world.
However, if you expand from the inside out, first you get:
Meep meep: that's not a valid `.'` invocation - we're missing the object.
Wanna know what's cool though? It's easy to fix!
And not the reverse. Let's take this:
How it should be
If you macro-expand from the outside in, first you get:
And then
.'
can expand correctly (that's the macro from Reagent, by the way)And everything is fine with the world.
How it currently be
However, if you expand from the inside out, first you get:
Wanna know what's cool though? It's easy to fix!