Giter Site home page Giter Site logo

Comments (8)

JakeWharton avatar JakeWharton commented on May 5, 2024 7

deferredObservable

You can already use defer { .. } with import rx.Observable.defer so 👍 to removing this.

emptyObservable

You can use empty() with import rx.Observable.empty so 👍 to removing this.

observable

This just seem superfluous. Almost no one should be using create anyway. just, defer, fromCallable and fromAsync are all better choices that will prevent you from shooting yourself in the foot. 👍 to removing this.

from rxkotlin.

cy6erGn0m avatar cy6erGn0m commented on May 5, 2024 4

They might help with readability

This is why they are here. Almost everything here is just to make code look better.

from rxkotlin.

thomasnield avatar thomasnield commented on May 5, 2024 3

I agree with @JakeWharton here. Pretty much any function that is not an extension function should be removed. These resemble more syntactic saccharine than syntactic sugar. They offer minimal readability benefit and makes moving from RxJava to RxKotlin more convoluted, and many will keep using the RxJava factories anyway.

Besides, if people want them that badly they can implement these functions themselves on their domain with little effort, to the point it is not even worth creating a library for. That's the great thing about Kotlin. You can create your own DSL for your needs.

@stepango would you like me to put in a PR removing all these functions?

from rxkotlin.

stepango avatar stepango commented on May 5, 2024 2

Agreed with @JakeWharton, @maxandron and @thomasnield. This functions will be removed in upcoming 1.x and 2.x along with some others. Feel free to reopen this issue for further discussion.

from rxkotlin.

ultimate-deej avatar ultimate-deej commented on May 5, 2024 1

I believe these functions are here to to comply with standard Kotlin functions like emptyArray, emptyMap etc.
So they do add something kotlin specific, at least emptyObservable.
empty

from rxkotlin.

maxandron avatar maxandron commented on May 5, 2024

I see, thanks.
I thought this library was adding kotlin specific readability helpers. These three methods could just as well be in the original RxJava api.

from rxkotlin.

stepango avatar stepango commented on May 5, 2024

@thomasnield I'll prefer to deprecate it first and remove it in one of the future releases

from rxkotlin.

thomasnield avatar thomasnield commented on May 5, 2024

Sounds good.

from rxkotlin.

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.