Fork me on GitHub
#clojurescript
<
2021-11-10
>
dazld11:11:15

not a huge thing, but did anyone ever consider adding support for functions to name? JS has a name property, and I was expecting name to just access that, as the implementation for functions. eg: (ignore reagent stuff in the error)

dazld11:11:22

I guess advanced comp is going to break the automatic names though

p-himik11:11:55

Indeed. It would also add to the list of distinctions between CLJ and CLJS for no good reason (meaning, you already have .-name - you can just use it).

👍 1
opqdonut12:11:17

Asking here before filing a bug: anyone else bumped into "goog.debug.Logger is not a constructor"? My figwheel-main setup broke with this error when I upgraded CLJS 1.10.879 -> 1.10.893

opqdonut12:11:56

some details here:

dnolen14:11:40

@dazld we do in some case generate names to aid w/ debugging (fns inside top-levels) - there are some complexities around handling scope etc.

dnolen14:11:05

but there is a bigger problem which polluting the top scope if you do it at the top level

dnolen14:11:29

i.e. var my.namespace.foo = function my$namespace$foo(...) { ... }

👍 1
dazld14:11:06

it was a very lazy thought. a map or so would be more appropriate for carrying an identifier around with a fn, for sure.

dazld14:11:06

the symmetry was appealing though

dnolen15:11:35

it is an interesting question - around the time where we did source maps such things were considered and avoided for the above reasons