We have a bunch of cases where there's a complex type stored inside a DOM object. Especially enums.
-
-
It’s still possible to have complex objects stored inside DOM objects, with the “Rust object wrapper” I’m proposing. Just not complex objects that themselves hold onto DOM objects. Those would have to be replaced with alternatives.
1 reply 0 retweets 1 like -
Yeah, the latter is what I'm talking about
1 reply 0 retweets 1 like -
Replying to @ManishEarth @pcwalton and
When I say complex I mean a mix of rust and js stuff.
2 replies 0 retweets 0 likes -
Well, let’s not do that then :) You can always replace that stuff with JS containers. This may have some kind of ergonomic cost, but I’m inclined to suggest that DOMRefCell and Traceable (in addition to memory unsafety!) are much worse ergonomic costs.
3 replies 0 retweets 0 likes -
Josephine would let us have our cake and eat it. I would much rather avoid JS collections.
2 replies 0 retweets 2 likes -
Doesn’t Josephine have an awkward cursor API you have to deal with?
1 reply 0 retweets 0 likes -
Not much more than having to root JS collections and whatnot.
1 reply 0 retweets 2 likes -
I dunno, https://github.com/asajeffrey/josephine/blob/master/examples/dbllist/dbllist.rs … looks really complicated compared to just using a plain old JS collection.
2 replies 0 retweets 1 like -
Could be. My gut feeling is that this is a situation of the grass being greener on the other side: we *know* exactly what Josephine looks like, we don't know what this thing will
3 replies 0 retweets 1 like
I dunno, my gut feeling tells me otherwise. Objective-C is an existence proof that this strategy works, albeit not in the context of JS specifically…
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.