Coder Social home page Coder Social logo

Comments (3)

simonmar avatar simonmar commented on May 18, 2024

Do you have an example where this would be useful? It would be unsafe in the sense that you could write non-deterministic things using it.

from monad-par.

treeowl avatar treeowl commented on May 18, 2024

Yes. I actually considered something a bit like this in unordered-containers (for alterF), but rejected it for domain-specific performance reasons. It can happen that several different "pure" computations are each capable of capturing information that will be useful for the others. It's possible to take advantage of this by using unsafeDupablePerformIO to write that information to a reference the other computations can access. But if multiple-put is absolutely prohibited, this won't work.

from monad-par.

simonmar avatar simonmar commented on May 18, 2024

Ok, it seems like you might want two versions - unsafeTryPut that doesn't overwrite and unsafeWrite that overwrites. I'd be happiest if this could be done without affecting the performance of code that doesn't use these, and the documentation should make it clear which guarantees are lost by using these.

from monad-par.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.