Ah heh yes, I couldn't remember. foo.constructor === Object
is what cljs.core/object? does. David On Wed, Aug 5, 2015 at 12:00 PM, Marc Fawzi <[email protected]> wrote: > A JS question for the CLJS master :) > > I think by 'foo.constructor.prototype === Object' > > you meant either this: foo.constructor.prototype === Object.prototype > > or this: a.constructor === Object > > but not 'foo.constructor.prototype === Object' > > > > > > > > > On Wed, Aug 5, 2015 at 7:51 AM, David Nolen <[email protected]> > wrote: > >> Er, that test would have be `foo.constructor.prototype === Object`. >> >> David >> >> On Wed, Aug 5, 2015 at 10:50 AM, David Nolen <[email protected]> >> wrote: >> >>> There is no simple test for plain objects, `typeof x` will return >>> `"object"` for many things. only `foo.constructor === Object` is going to >>> work. This is not as fast as it would seem. >>> >>> We're not going to add any more cases to `get`. >>> >>> I've said all I'm going to say about this matter :) >>> >>> David >>> >>> On Wed, Aug 5, 2015 at 10:43 AM, Peter Taoussanis <[email protected] >>> > wrote: >>> >>>> > Yes performance. We not adding any more cases to `get`. >>>> >>>> `get`'s implemented with `cond` - adding an object case after other >>>> conditions (before `:else nil`) wouldn't affect performance in any real >>>> way, would it? >>>> >>>> Is object property access not a pretty common occurrence? >>>> >>>> -- >>>> Note that posts from new members are moderated - please be patient with >>>> your first post. >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "ClojureScript" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at http://groups.google.com/group/clojurescript. >>>> >>> >>> >> -- >> Note that posts from new members are moderated - please be patient with >> your first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
