• Orhan Tozan

    Orhan Tozan

    2 months ago
    This feels a bit random, but anyone else feel like
    .filter { }
    could have gotten a better name? Everytime I see
    .filter { }
    , my brain has to stand still and figure out if it actually means "filter out" or not. I think
    .where { }
    would have been a more easier name to scan and understand what it does
    Orhan Tozan
    Javier
    +4
    12 replies
    Copy to Clipboard
  • e

    Eric Ou

    2 months ago
    Explicit/Short hand methods for lazy delegations(In addition to
    lazy()
    , as in
    lazyNone()
    ,
    lazyPublication()
    , and
    lazySyncronized()
    , instead of
    lazy(LazyThreadSafetyMode)
    e
    Mikhail
    6 replies
    Copy to Clipboard
  • h

    holgerbrandl

    2 months ago
    When using the duration api why is it d.toDouble(DurationUnit.HOURS) instead of the now deprecated (but seemingly more concise) d.inHours?
  • h

    holgerbrandl

    2 months ago
    Is it planned to add common collection aggregators for kotlin.time.Duration such as sumOf? Or listOf(1.hours, 2.minutes).sum()?
  • Igor Kolomiets

    Igor Kolomiets

    2 months ago
    Is it a bug or a feature?
    fun main() {
        var numbers = emptySequence<Int>()
    
        numbers = sequence {
            yieldAll(numbers)
            yield(1)
        }
    
        println(numbers.iterator().next()) // throws StackOverflowError
    }
    I do realize that such an approach to build up a sequence may seem unnatural, but for my case (I have to implement Kotlin Serialization’s Encoder interface which methods adds/yields next value for the sequence) I haven’t figured out an alternative.
    Igor Kolomiets
    e
    +1
    6 replies
    Copy to Clipboard
  • j

    Jonathan Ellis

    2 months ago
    is there a ticket for adding a BiMap to stdlib that I can vote for?
    j
    1 replies
    Copy to Clipboard
  • Mikhail

    Mikhail

    2 months ago
    there should be
    LazyList<T>
    that consumes
    Lazy<T>
    and produces
    T
  • Mikhail

    Mikhail

    2 months ago
    Why doesn't
    Lazy
    implement
    equals
    and
    hashcode
    ?
    Mikhail
    Dominaezzz
    +2
    12 replies
    Copy to Clipboard
  • e

    elect

    1 month ago
    I'd like to check if a range is within another range, ie
    i-2..i+2 in wd.indices
    e
    e
    +3
    7 replies
    Copy to Clipboard
  • e

    elect

    1 month ago
    also
    averageBy{ .. }
    on iterables, as shortcut instead of
    map{ }.average()
    e
    r
    +1
    7 replies
    Copy to Clipboard