https://kotlinlang.org logo
Join SlackCommunities
Powered by
# result
  • y

    yasyd

    11/18/2015, 8:48 AM
    I understand. I think is better to limit the knowledge required to understand something if possible, so yeah, IMHO better to change it if you can
  • k

    kittinunf

    11/18/2015, 8:56 AM
    Would you like to fix those for me? I am happy to accept your contribution.
  • y

    yasyd

    11/18/2015, 8:59 AM
    OK I will open a couple of PR, one this and the other for 'or'
  • a

    apatrida

    11/18/2015, 12:37 PM
    Some functional person years ago picked
    flatMap
    for odd uses, everyone copies to be consistent, but the name really isn’t that intuitive for most of its use cases. anyway, do what you wish, just adding suggestions, and like you said that if people use Kovenant we might not use Result since we can do sync or already resolved promises there and keep the API.
  • k

    kittinunf

    11/21/2015, 7:49 AM
    @yasyd: Hey have you checked out my comment on the PR? What do you think about it?
  • y

    yasyd

    11/21/2015, 5:29 PM
    @kittinunf: sorry I saw it just now. I answered you there.
  • k

    kittinunf

    11/23/2015, 10:42 AM
    @yasyd: I have merged your PR. I will do couple of fixes before launch next version. Thanks for your contribution, BTW. Don’t hesitate to do more 💖
  • y

    yasyd

    11/23/2015, 11:53 AM
    Ok I will let you know if I will have some new suggestion.
  • k

    kittinunf

    11/30/2015, 6:11 PM
    <!channel>: 0.3 is out. Add
    or
    interface to chain
    Result
    with fallback value. Introduce
    ResultType
    as interface so client could implement custom type of
    Result
    .
  • k

    kittinunf

    12/16/2015, 12:24 PM
    <!channel>: 0.31 is out to support Kotlin beta 3.
  • a

    apatrida

    12/28/2015, 6:15 PM
    I referenced Result from this SO answer: http://stackoverflow.com/questions/34498562
  • a

    apatrida

    12/28/2015, 6:38 PM
    Also referenced here in an answer: http://stackoverflow.com/questions/26341225
  • k

    kittinunf

    12/29/2015, 3:55 AM
    @apatrida: That is a heck of advertisement @apatrida. Thank you simple smile
  • k

    kittinunf

    12/29/2015, 3:56 AM
    If you happen to be in BKK, you are up for a beer not just a cup but a tower, jajaja ...
  • a

    apatrida

    12/29/2015, 4:14 AM
    jaja, thanks @kittinunf . Last time I was there I was in the middle of a brawl in a train station of people trying to buy tickets to get into the center which was blockaded during a possible coup. Next time, I’ll take beer, not blood. simple smile
  • k

    kittinunf

    12/29/2015, 4:17 AM
    Oh sorry to hear that. Our political situation was not the best at that time. It is still going on but seems to be much better. Next time it is, let me know. simple smile
  • a

    apatrida

    12/29/2015, 4:20 AM
    sounds good!
  • a

    apatrida

    12/29/2015, 4:20 AM
    I always give things a few try, accidental political instability happens.
  • k

    kittinunf

    01/24/2016, 5:33 AM
    Version 0.4 is out with minor improvement. Thank @mplatvoet for refactoring my code 😄
  • k

    kittinunf

    02/16/2016, 4:38 PM
    <!here|@here> version 1.0.0 is out to support Kotlin 1.0.0 😄
  • y

    yasyd

    07/21/2016, 5:58 AM
    @yasyd has left the channel
  • m

    mesquka

    04/26/2017, 2:24 PM
    @mesquka has left the channel
  • d

    Damien

    08/03/2021, 11:51 PM
    I see
    Result
    has been been opened up more widely somewhat recently. Yay! Are those who'd worked on it still paying attention here? I was wondering why constrain the error type to be
    Throwable
    instead of another generic parameter. Why
    Result<T>
    instead of
    Result<T,E>
    ?
    👍 2
  • a

    aidanvii

    08/19/2021, 1:58 PM
    I recently started using
    Result
    as a return type as of Kotlin 1.5. I’m having seemingly random crashes with suspending functions that return
    Result
    (I haven’t checked with other inline/value classes). it’s happening in the generated
    invokeSuspend
    :
    Copy code
    Fatal Exception: java.lang.ClassCastException
    java.util.ArrayList cannot be cast to kotlin.Result
  • k

    kittinunf

    08/29/2021, 12:00 PM
    kotlin.Result
    and our Result has name clashes, unfortunately. The fact that the error that you pasted is pointing to
    kotlin.Result
    kinda give a tell. Is it possible that you didn’t use our Result? Could you check first whether you are using the “correct” Result class?
    a
    • 2
    • 2
  • r

    Robert Jaros

    12/06/2022, 11:54 AM
    Hello, is there any chance publishing JS artifacts for IR backend (or with both option)?
  • k

    kittinunf

    12/19/2022, 12:51 PM
    @Robert Jaros would you be up for a PR then? I don't use Kotlin JS myself so I didn't get a chance to work on this as priority
  • j

    JBordage

    01/05/2023, 9:56 PM
    I was about to post a question, but then I realized this channel isn't for
    kotlin.Result
    but rather for a result library with the same name xD
    a
    • 2
    • 1
  • k

    kittinunf

    01/09/2023, 7:42 AM
    Sorry to disappoint you 🙏
  • a

    aidanvii

    02/27/2023, 1:25 PM
    I frequently get a
    ClassCastException
    returning
    kotlin.Result
    from suspending functions, but I can’t accurately figure out the steps to reproduce. it’s always
    kotlin.Result cannot be cast to (TheWrappedType)
    . Has anyone else seen this or figured out why it happens and how to avoid it? I’m at the stage where I’m considering ditching this API as it’s extremely flakey because of this 😕