News for hackers. Stuff that matters.
Re:The Origins of Scala (2009) by 29athrowaway on Saturday November 29, 2025 @04:20PM (#46090891)
Except when you chain many collection operations... then it breaks horribly.
Re:The Origins of Scala (2009) by tbct on Saturday November 29, 2025 @04:44PM (#46091072)
Can you elaborate on what you're referring to? I can see performance becoming a problem if you repeatedly chain non-optimisable (in bytecode) as excluding the in place operations I believe all ops re-allocate the collection.
Re:The Origins of Scala (2009) by neko-kai on Saturday November 29, 2025 @06:50PM (#46091992)
Just use `.iterator` before chaining and the final collection will only be allocated once.
Re:The Origins of Scala (2009) by ATMLOTTOBEER on Saturday November 29, 2025 @10:07PM (#46093239)
Ignore that person they don’t know what they’re talking about lol