GithubHelp home page GithubHelp logo

Comments (7)

phimage avatar phimage commented on May 27, 2024

Maybe some people use it.
One way to do it is two add a compilation flag, and do two implementation one with public variables, the other only internals

from brightfutures.

hiltonc avatar hiltonc commented on May 27, 2024

Rather than complicate the library, I'd recommend removing them with a non-backwards compatible version change and a short code snippet in the release notes. They're very simple extensions.

from brightfutures.

phimage avatar phimage commented on May 27, 2024

With that logic, we coud provide a minimal framework and ask everyone to copy the same piece of code in all their projects, so where is the limit?
I found that using it, is convenient with asyncAfter... (like it is done in unit test, so not part of the framework)

Example of discussion about add or not isEven, isOdd in Swift. foundation.
https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md - https://forums.swift.org/t/se-0225-adding-iseven-isodd-ismultiple-to-binaryinteger/15382/3

(ps: non-backwards compatible version must not occurs in a 7.0.1, but a 7.1.0 now)

from brightfutures.

hiltonc avatar hiltonc commented on May 27, 2024

I would say the limit is: what is the purpose of the library? A utility library will have all manner of useful extensions. I would expect a futures library to provide futures, promises, etc. The Swift framework is going to be a special case because all developers use it.

Another option would be a CocoaPod subspec for useful extensions.

According to semantic versioning, a non-backwards compatible version would be 8.0.0 (increment major version)

from brightfutures.

phimage avatar phimage commented on May 27, 2024

But 7.0.0 is out and it will take time to have a new release. So there is also a practical way, a swift way with breaking change every times, even in swift ;(

By the way if you use cocoapod and that could help you, feel free to PR.
Default target must keep all the code for everyone, but we could have a Core subspec without some extensions.

from brightfutures.

Thomvis avatar Thomvis commented on May 27, 2024

Thanks for the discussion, @hiltonc and @phimage . I think there's a good argument for removing the second/millisecond helpers. It's not part of the core functionality of the framework.

I remember adding those helpers because I didn't like the way DispatchTime has to be created. Looking at it again, I think it's actually fine. This:

XCTAssert(f.forced(500.milliseconds.fromNow) != nil)

would become:

XCTAssert(f.forced(.now() + .milliseconds(500)) == nil)

I'd be open to fixing this and releasing it soon. The version number would be 8.0.0 indeed. I'm not sure if I have time for it, so a PR is very welcome, @hiltonc. If it is still relevant to you after all this time.

from brightfutures.

hiltonc avatar hiltonc commented on May 27, 2024

Thank you!

from brightfutures.

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.