Fork me on GitHub
#cljs-dev
<
2016-04-21
>
r0man15:04:32

@dnolen: I did some research on the shims, updated the patch and left a comment http://dev.clojure.org/jira/browse/CLJS-1628

dnolen16:04:05

@r0man: I really don’t see the value of using goog.typeOf here, it’s really slow

dnolen16:04:14

why not just exists? + instance?

r0man16:04:31

I tried this in node, and it returns false (instance? js/Symbol (.for js/Symbol "x"))

dnolen16:04:53

@r0man: so I want to an explanation for that and it should be added to the ticket

dnolen16:04:09

also want to know whether that’s standard behavior across JS engines

dnolen16:04:42

as usual stuff like this is not even remotely as simple as it seems

dnolen16:04:51

another thing worth considering whether we should even generate this test if the user isn’t emitting >= ES6

r0man16:04:47

ok, I'll check those points and add it to the ticket

r0man20:04:21

David, I added more information to the ticket. not quite sure if the str fn should handle symbols. I think it should, but would appreciate feedback on this.

dnolen20:04:23

@r0man: does Symbol not have a toString method?

dnolen20:04:45

in anycase the str thing should be separate issue

dnolen20:04:37

sorry I looked over the comments, yeah ok, but yes this definitely needs to be separate issue - the current issue losing focus fast

dnolen20:04:29

@r0man: also people must have encountered this problem when using shims - how are JS people doing type detection? typeof (for native) + instance check (for shim)?

r0man21:04:43

yes, symbol does have a toString method, but I think it is not used via the str function. Also Francis Avila just pointed out that my suggestion of using toString is not possible because of some issue on safari

r0man21:04:18

I'll open a new issue for the str case

r0man21:04:08

btw, given that this issue and http://dev.clojure.org/jira/browse/CLJS-890 have something to do with browser quircks is there interest in running the ClojureScript tests in different browsers via SauceLabs or something similar?