3

As a part of academic project I was about to microbenchmark some Java and Kotlin collections behaviours, and compare them to each other.

Recently I found out, that under the hood Kotlin, when run on the JVM, uses the same implementations of collections that Java uses - only adding its own semantics over it - and the conversion is done during compilation, so no changes in runtime are observed.

From the looks of it, Scala collections library is an entirely different world, and although it supports converting Scala to Java collections, it does so through additional converters and not because it shares the codebase, but I couldn't find a statement in the documentation that 100% confirmed it, and would like a second opinion.

TL;DR - Does scala have its own unique collections implementations separate from the core Java codebase?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.