Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 18. Advanced Types > The Scala Type System

18.9. The Scala Type System

The Scala language reference gives an exhaustive list of all Scala types, which is reproduced in Table 18–1, with brief explanations for each type.

Table 18–1. Scala Types
TypeSyntaxNotes
Class or traitclass C ..., trait C ...See Chapter 5, Chapter 10
Tuple type(T1, ..., Tn)Section 4.7
Function type(T1, ..., Tn) => T 
Annotated typeT @ASee Chapter 15
Parameterized typeA[T1, ..., Tn]See Chapter 17
Singleton typevalue.typeSee Section 18.1
Type projectionO#ISee Section 18.2
Compound typeT1 with T2 with ... with Tn { declarations }See Section 18.6
Infix typeT1 A T2See Section 18.7
Existential typeT forSome { type and val declarations }See Section 18.8



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial