Skip to content

atom improvements #424

Open
Open

Description

@mpenet

Just for the record, a few things that are "missing":

  • watches
  • validation
  • compare-and-set!
  • metadata support

Activity

  1. mpenet commented on Nov 4, 2015

    @mpenet
    ContributorAuthor

    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).

  2. thomasmulvaney commented on Nov 4, 2015

    @thomasmulvaney
    Member

    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

  3. mpenet commented on Nov 4, 2015

    @mpenet
    ContributorAuthor

    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.

  4. mpenet commented on Nov 4, 2015

    @mpenet
    ContributorAuthor

    btw metadata support is in #425

  5. egregius313 commented on Jun 15, 2017

    @egregius313
    Contributor

    Is this still of interest? I would be happy to experiment with adding the other features.

  6. thomasmulvaney commented on Jun 15, 2017

    @thomasmulvaney
    Member

    Your welcome to add anything that tickles your interests. These atom improvements would certainly be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions