Coder Social home page Coder Social logo

Comments (7)

nyuichi avatar nyuichi commented on June 8, 2024 1

@KeenS

Oh, tha sounds crazy... But that's a good explanation. I understood it.

from picrin.

KeenS avatar KeenS commented on June 8, 2024

Hmm that's interesting. As you described in your blog, what matters seems reentrancy.

Could I ask you to send us patch? Here the code and the patch won't be so big. Thank you.

from picrin.

stibear avatar stibear commented on June 8, 2024

I tried to fix these bugs and have fixed the second bug easily.

However, to fix the first problem requires to overwrite pointers (ref. http://srfi.schemers.org/srfi-45/srfi-45.html : this uses a list as a 'box' instead of the pointer).

In our implementation, a promise is a record. I'm worried that wrapping by a list takes some merits of record types from our promise.

What do you think of this?

from picrin.

KeenS avatar KeenS commented on June 8, 2024

Oh, sorry @yhara I asked you to send patch but @stibear has done the task.

from picrin.

yhara avatar yhara commented on June 8, 2024

@KeenS no problem :-)

In our implementation, a promise is a record. I'm worried that wrapping by a list takes some merits of record types from our promise.

One merit of implementing promise as record is that you can hide implementation details from user. From that point of view, wrapping box with record is better than wrapping record with box.

from picrin.

nyuichi avatar nyuichi commented on June 8, 2024

@yhara @KeenS @stibear

Hi, guys

Could someone tell me why the second test is expected to be ok? I still don't figure out it. Just pointing the paragraph in the spec is enough.

Thanks.

from picrin.

KeenS avatar KeenS commented on June 8, 2024

@nyuichi it's sensitive, but I found this sentence.

The value of the promise must be cached (or “memoized”) so that if it is forced a second time, the previously computed value is returned.

At the first call of force, the expression is expected to return ng but in the expression, the second call of force return ok (that's the first return from force). Apparently, the first computed value is the first returned value.

from picrin.

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.