Giter VIP home page Giter VIP logo

Comments (7)

kseebaldt avatar kseebaldt commented on August 29, 2024

That sounds like a good idea. I wonder if an exception or warning would be better?

from deferred.

kseebaldt avatar kseebaldt commented on August 29, 2024

How about this?

f06157e

from deferred.

kseebaldt avatar kseebaldt commented on August 29, 2024

I saw this in the "Exception Programming Topics" guide (https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Exceptions/Exceptions.html):

You should reserve the use of exceptions for programming or unexpected runtime errors such as out-of-bounds collection access, attempts to mutate immutable objects, sending an invalid message, and losing the connection to the window server. You usually take care of these sorts of errors with exceptions when an application is being created rather than at runtime.

A promise should be immutable after being fulfilled, so an exception seems appropriate.

from deferred.

akitchen avatar akitchen commented on August 29, 2024

Sounds great to me. I also like your spec technique of registering an assertion handler. I haven't run your specs but I assume this keeps the output clean?

On Tue, Aug 19, 2014 at 11:37 AM, Kurtis Seebaldt
[email protected] wrote:

I saw this in the "Exception Programming Topics" guide (https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Exceptions/Exceptions.html):
You should reserve the use of exceptions for programming or unexpected runtime errors such as out-of-bounds collection access, attempts to mutate immutable objects, sending an invalid message, and losing the connection to the window server. You usually take care of these sorts of errors with exceptions when an application is being created rather than at runtime.

A promise should be immutable after being fulfilled, so an exception seems appropriate.

Reply to this email directly or view it on GitHub:
#24 (comment)

from deferred.

kseebaldt avatar kseebaldt commented on August 29, 2024

Yeah, the assertion handler keeps the NSAssert log message from appearing.

from deferred.

akitchen avatar akitchen commented on August 29, 2024

I like this f06157e - what do you think about merging it in?

from deferred.

kseebaldt avatar kseebaldt commented on August 29, 2024

done

from deferred.

Related Issues (11)

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.