i just fixed an issue in our codebase where the br...
# javascript
t
i just fixed an issue in our codebase where the browser complained that
asDynamic()
does not exist on
tmp$
. How is that even possible? shouldn't
asDynamic()
be inlined?
a
Most likely it was invoked on
dynamic
. For example
10.asDynamic().asDynamic()
translates to
10.asDynamic()
The rule "<dynamic>.bar translates to <dynamic>.bar" takes precedence here.
t
ah i see. Is that an issue for your point of view? at least for me it's surprising 😄
(allthough it makes sense)
a
I would prefer a visual cue for dynamic members, e.g. a.asDynamic().asDynamic(). In my opinion having dynamic members look different would solve this issue, highlight potentially unsafe code and potentially discourage people from abusing those.
Although I would agree that solving the "why doesn't
asDynamic()
go away" is more important than addressing "why do I have to write
a["asDynamic"]()
instead of `a.asDynamic()`"
👍 1