• Hullaballoonatic

    Hullaballoonatic

    2 years ago
    I see that kotlin is getting its own implementation of
    Duration
    in the stdlib, and I'm wondering if it could also have its own version of
    Date
    that cleans up the mess that is Java's
    Date
    ,
    DateTime
    ,
    LocalDate
    ,
    LocalDateTime
    Hullaballoonatic
    gildor
    +3
    19 replies
    Copy to Clipboard
  • p

    PHondogo

    2 years ago
    Hello! Is there any plans to support multiplatform BigDecimal?
    p
    1 replies
    Copy to Clipboard
  • d

    Daniel Rust

    2 years ago
    When is it best to use
    !!
    over
    checkNotNull
    ?
    d
    danny
    +1
    6 replies
    Copy to Clipboard
  • b

    bbaldino

    2 years ago
    did something change with
    Result
    between 1.3.21 and 1.3.50? in 1.3.21 i can access it fine but can't find it in 1.3.50 (
    -Xallow-result-return-type
    doesn't help either)
    b
    1 replies
    Copy to Clipboard
  • Alpesh Vas

    Alpesh Vas

    2 years ago
    What do you guys think?
    Alpesh Vas
    Xavier F. Gouchet
    +5
    25 replies
    Copy to Clipboard
  • j

    jimn

    2 years ago
    when i run this.iterator() which calls invoke(Int) should i assume origin is the vtable for IDataframe::invoke(Int) ? do i need to manually delegate each method i wish to expose if I iwsh to use specialized methods I write in the delegator ?
    class FrameGrouper(
        private val origin: IDataFrame,
        vararg val gby: Int
    ) :  IDataFrame  by origin  {
        override fun invoke(row: Int) =...}
    j
    karelpeeters
    7 replies
    Copy to Clipboard
  • Hullaballoonatic

    Hullaballoonatic

    2 years ago
    inline fun <T, reified R> Array<T>.mapToArray(transform: (T) -> R) = 
        Array(size) { transform(get(it)) }
    etc for
    List
    , primitive arrays...
    Hullaballoonatic
    miha-x64
    2 replies
    Copy to Clipboard
  • r

    Ruckus

    2 years ago
    Just throwing this out there, does anyone think it would be a good idea to include such a function in std-lib:
    inline infix fun Any?.hash(other: Any?): Int = hashCode() * 31 + other.hashCode()
    It would simplify writing
    hashCode
    functions:
    class ABC<A, B, C>(val a: A, val b: B, val c: C) {
        override fun hashCode() = a hash b hash c
    }
    r
    Burkhard
    +3
    12 replies
    Copy to Clipboard
  • Hullaballoonatic

    Hullaballoonatic

    2 years ago
    Why is the function
    List(7) { it + 3 }
    a top level function instead of an static invoke operator? Is the latter somehow unintended usage of the language, or against standard code style? static invoke operator is just so much more efficient than constructors, given you can error check prior to instantiation, among many other things. I can see how it can read very alien to those not kotlin-savvy, however.
    Hullaballoonatic
    j
    +1
    4 replies
    Copy to Clipboard
  • Dominaezzz

    Dominaezzz

    2 years ago
    Proposal.
    fun CharSequence.splitToSequences(
        vararg delimiters: String,
        ignoreCase: Boolean = false,
        limit: Int = 0
    ): Sequence<CharSequence>
    Dominaezzz
    Hullaballoonatic
    +3
    15 replies
    Copy to Clipboard