Daniel Pitts
08/14/2025, 3:44 PMThe inner `None` object, used in the `Maybe` class to represent an absent value, is defined using `data object`. Although this is suitable for describing uniqueness and immutability, `data object` is over-specified here, as it incurs unnecessary memory allocation inefficiency compared to plain `object`. Consider replacing `data object None` with `object None`.
This seems like its wrong...Seri
08/14/2025, 3:52 PMDaniel Pitts
08/14/2025, 3:57 PMYoussef Shoaib [MOD]
08/14/2025, 4:12 PMtoString
and equals
, that's it!Daniel Pitts
08/14/2025, 4:14 PMCLOVIS
08/14/2025, 8:01 PMequals
?Daniel Pitts
08/14/2025, 8:02 PMCLOVIS
08/14/2025, 8:02 PMCLOVIS
08/14/2025, 8:02 PMYoussef Shoaib [MOD]
08/14/2025, 8:10 PMother is Foo
instead of the default JVM behaviour of reference equality other === this
. The idea being that, if a serialization framework accidentally creates multiple copies of a singleton object, they'll at least compare equal
to each other.Daniel Pitts
08/14/2025, 8:11 PMreturn other is This
or return other === this || other is This
? Functionally identical, just wondering about runtime cost (if any)Youssef Shoaib [MOD]
08/14/2025, 8:12 PMYoussef Shoaib [MOD]
08/14/2025, 8:21 PMhashCode
so that it's the same for all instances of the object type. Makes sense since that's required for equals
to function properlyDaniel Pitts
08/15/2025, 2:19 PMIn the refactored implementation of `toTree`, `DeepRecursiveFunction` is used to convert mutable nodes to tree nodes. While this approach is modern and succinct, recursive functions may hit `StackOverflowError` for deeply nested structures unless Kotlin ensures proper tail-recursion optimizations. Consider testing or adding safeguards for handling large, deeply-nested datasets.
Is there a place to report these to help improve the feature?Youssef Shoaib [MOD]
08/15/2025, 2:21 PMDaniel Pitts
08/15/2025, 2:25 PMArjan van Wieringen
08/15/2025, 6:44 PMDaniel Pitts
08/15/2025, 6:46 PMArjan van Wieringen
08/15/2025, 6:52 PMDaniel Pitts
08/16/2025, 2:50 PM