type alias

Scala type aliases (syntax, examples)

In Scala you can declare a type alias. Typically you do this to create a simple alias for a more complex type.

Using a type alias to simplify a complex type

For example, on this page I note a good example where someone on StackOverflow first defined a type alias named Row, and then created a second type alias named Matrix as a list of rows:

Scala type examples (type aliases and type members)

At some point I want to write more about Scala type aliases and type members, but for today I just want to put a little reminder here for myself.

In the meantime, here are two images from stackoverflow that provide Scala type examples.

Using Scala type aliases

This first image is from this link, and discusses the difference between a type and a value: