cljs-dev

borkdude 2024-10-14T15:28:28.756949Z

In reaction to clojure 1.12, I guess something like this would be pretty neat:

(map .-value [#js {:value 1}])
but since .-value isn't fully qualified, it wouldn't be exactly according to 1.12's example. Still, perhaps worth considering? Perhaps would cause trouble with extern inference?

p-himik 2024-10-14T15:30:55.244479Z

A compliant version, at least in terms of reading: js/.-value.

dnolen 2024-10-15T19:34:30.123229Z

I think people are still generally confused about .- which requires understanding advanced compilation - so I am not sure about the utility of this one.

borkdude 2024-10-14T15:34:56.234939Z

.-value is already readable

borkdude 2024-10-14T15:36:32.204679Z

perhaps (map ^js .-value [#js {:value 1}]) would be necessary for inference

p-himik 2024-10-14T15:41:20.933259Z

Yes, but: > Symbols beginning or ending with '.' are reserved by Clojure. Although I don't know whether that means simple or fully qualified names.

p-himik 2024-10-14T15:42:04.639839Z

Well, given that simple names starting with dots can now be used by users of Clojure 1.12, I guess it's about FQNs..?

p-himik 2024-10-14T15:42:12.016369Z

Or maybe that's exactly what "reserved" meant.

borkdude 2024-10-14T15:42:14.983729Z

I interpret that as reserved for the language implementor ;)

👍 2