Connecting...

Blog Jack Sitc 2

Exploring "inline" by Dean Wampler

Blog Jack Sitc 2

​Let's explore inline with Dean Wampler!

At Scala in the City, Dean taught us how Scala 3 introduced the new keyword inline and what it means.

Exploring "inline"

Dean Wampler at Scala in the City

Scala 3 introduced a new keyword inline that tells the compiler to "inline" the corresponding code. For example, the definition of a method would be expanded into places where it is called, removing actual method invocations. Using examples, I'll describe how this works, the requirements for inlining to be possible, how inlining fits into the new metaprogramming system, and the performance implications of inlining.