Giter VIP home page Giter VIP logo

Comments (3)

dcoutts avatar dcoutts commented on June 7, 2024

Mmm. My intention of "documenting" it was to encourage people not to use it (I'd seen people use it without realising). To give people a proper understanding of it reqires quite a bit of effort. In particular I don't have a complete explanation of when it is safe. I'd consider a PR though.

As for deprecated, no it's not deprecated. The export list says:

        -- * Deprecated and unmentionable
        accursedUnutterablePerformIO, -- :: IO a -> a
        inlinePerformIO               -- :: IO a -> a

because in this section is one thing that's deprecated and one thing that's unmentionable, not that both are both. Could change that 'and' to an 'or' :-)

from bytestring.

jberryman avatar jberryman commented on June 7, 2024

My intention of "documenting" it was to encourage people not to use it

I know, but I think that's a dirty trick. I would help but have no idea how it's safe to use. For now I'll just try to use it strictly as you do in bytestring where I can see a performance benefit.

from bytestring.

dcoutts avatar dcoutts commented on June 7, 2024

@jberryman I think it's safe if the effects are completely read only and can be duplicated and run concurrently. So yes, reading from a foreign ptr when that foreign ptr memory region is guaranteed to be immutable is ok I think. Examples of "very bad things" include allocating memory or any other resource (those are what some of the linked examples did). Where the dividing line is exactly is very hard to pin down.

from bytestring.

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.