You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watches and validation are part of an inherited abstract class in clojure/java, it's shared by other ref types, we might want to do the same (or not). But I don't know what's the long term goal here, it depends if there is a plan to add other ref types (agents, refs) or not (as they are not so popular in clojure, at least in public projects).
It might be possible to get away with doing this in pixie itself rather than in rpython. In fact atoms are used in only 2 or 3 places from what I can tell in the underlying rpython code (basically where one might use ^:dynamic) in clojure. Maybe we could redefine it in pixie using deftype and give it all the other bells and whistles quite easily with protocols like IWatch
Yes, it's a possibility, my (very uneducated) guess is that atoms are done with rpython for performance reasons, seems like they would be more lightweight this way as well, at least until jit kicks in. And since they are used in some important code such as some stateful transducers, it makes sense. But I might be wrong, I don't know well enough about pixie internals tbh.
Probably something for @halgari to look into.
Activity
mpenet commentedon Nov 4, 2015
watches and validation are part of an inherited abstract class in clojure/java, it's shared by other ref types, we might want to do the same (or not). But I don't know what's the long term goal here, it depends if there is a plan to add other ref types (agents, refs) or not (as they are not so popular in clojure, at least in public projects).
thomasmulvaney commentedon Nov 4, 2015
It might be possible to get away with doing this in pixie itself rather than in rpython. In fact atoms are used in only 2 or 3 places from what I can tell in the underlying rpython code (basically where one might use ^:dynamic) in clojure. Maybe we could redefine it in pixie using deftype and give it all the other bells and whistles quite easily with protocols like IWatch
mpenet commentedon Nov 4, 2015
Yes, it's a possibility, my (very uneducated) guess is that atoms are done with rpython for performance reasons, seems like they would be more lightweight this way as well, at least until jit kicks in. And since they are used in some important code such as some stateful transducers, it makes sense. But I might be wrong, I don't know well enough about pixie internals tbh.
Probably something for @halgari to look into.
mpenet commentedon Nov 4, 2015
btw metadata support is in #425
egregius313 commentedon Jun 15, 2017
Is this still of interest? I would be happy to experiment with adding the other features.
thomasmulvaney commentedon Jun 15, 2017
Your welcome to add anything that tickles your interests. These atom improvements would certainly be great!