The Artima Developer Community


Programming in Scala cover Resources page for:
Programming in Scala
A comprehensive step-by-step guide

by Martin Odersky, Lex Spoon, and Bill Venners

(If you don't already have it, you can purchase Programming in Scala here.)

On this page you can download the zip file of the source code shown in the book, and find links to more information about Scala.

Scala's main website:

http://www.scala-lang.org/

You can download Scala here:

http://www.scala-lang.org/downloads

For more information on higher-kinded types, which aren't covered in the book, check out this paper:

http://www.cs.kuleuven.be/~adriaan/files/higher.pdf (PDF)

Structural types are also not covered in the book. Here's an example demonstrating their use:

class File(name: String) {
  def getName(): String = name
  def open() { /*..*/ }
  def close() { println("close file") }
}
def test(f: { def getName(): String }) { println(f.getName) }

test(new File("test.txt"))
test(new java.io.File("test.txt"))

Copyright © 2021 Artima, Inc. All rights reserved.