News for hackers. Stuff that matters.
Re:Ruby 3.4.0 by int_19h on Thursday December 26, 2024 @04:23PM (#42517926)
Kotlin is still rather different though in that it still implements stuff like map and filter outside of specific collection classes. If you look at the definition of, say, List, there's no map & filter there, only iterator. Instead, map & filter are defined as extension functions that work on any Iterable.

So semantically it's actually closer to Python, with the only difference that, since Python doesn't have extension methods, it has to use global functions for this, while Kotlin lets you pretend that those methods are actually members. But this is pure syntactic sugar, not a semantic difference.

There are no comments on this comment yet.