progs/lecture3.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 17 Nov 2016 03:10:44 +0000
changeset 55 6610c1dfa8a9
parent 53 9f8751912560
child 67 ca5884c2e3bd
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
ab77f6006f1f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
// regular expressions
ab77f6006f1f updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
// ?? polymorphism
53
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     3
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     4
A function should do one thing, and only one thing.
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     5
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     6
Make your variables immutable, unless there's a good reason not to.
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     7
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     8
You can be productive on Day 1, but the language is deep, so as you go
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
     9
along you’ll keep learning, and finding newer, better ways to write
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    10
code. Scala will change the way you think about programming (and
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    11
that’s a good thing).
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    12
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    13
Of all of Scala’s benefits, what I like best is that it lets you write
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    14
concise, readable code
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    15
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    16
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    17
9f8751912560 updated
Christian Urban <urbanc@in.tum.de>
parents: 8
diff changeset
    18
ScalaTest download page: http://www.scalatest.org/download