Fork me on GitHub
#cljs-dev
<
2019-08-18
>
lilactown00:08:50

is mikerods question related to romans?

lilactown00:08:26

I think we don’t implement IMeta for arbitrary objects because it would require either mutating the object or doing some sort of copy

lilactown00:08:18

primitives probably couldn’t hold meta without some wrapper

mfikes00:08:04

Right. I had suggested that a revision to macroexpansion logic couldn't arbitrarily put meta on the result of macroexpansion (in other words convey, induce, whatever term). Mike is right in that you could force the issue. But you definitely wouldn't want to. Nor does it seem either necessary, and the whole idea seems at odds with Clojure's behavior.

👍 4
mfikes00:08:11

In some sense, one odd aspect of the hinting failure is that it only happens because we happen to have a macro defined for aget.

Roman Liutikov00:08:37

It seems like currently most optimisations that are built with type inference are operating with primitive types e.g. string boolean number, would it make sense to include core data types as well?

Roman Liutikov00:08:52

To be fair there's also 'array and 'seq

mfikes00:08:29

https://clojure.atlassian.net/browse/CLJS-3132 is an example of optimizations surrounding cljs.core/Keyword and cljs.core/Symbol

Roman Liutikov01:08:08

I was thinking about checked if, right now compiler is looking for constant values, boolean and seq

Roman Liutikov01:08:23

What is 'clj tag for btw?

mikerod13:08:52

Thanks for explaining. And yeah that all makes sense.