Slide 1

Slide 1 text

Richard Dallaway @d6y www.underscoreconsulting.com

Slide 2

Slide 2 text

Agenda 1. Benefits of Scala 2. What it looks like 3. Why we trust it 4. How to start

Slide 3

Slide 3 text

Benefits Productivity Maintainability Multi-core Developer Joy

Slide 4

Slide 4 text

Without giving up... Performance Curly Braces Java Investment Tooling (but...)

Slide 5

Slide 5 text

import org.joda.time.DateTime case class Subscription( owner: String, isTrial: Boolean, expiry: DateTime) val nextMonth = new DateTime().plusMonths(1) val sub = new Subscription( "Bob", isTrial = true, nextMonth) sub.owner // “Bob” sub == new Subscription( "Bob", true, nextMonth) // true

Slide 6

Slide 6 text

val subs = List( Subscription("Anna", true, new DateTime()), ... ) val trials : List[Subscription] = subs.filter(s => s.isTrial) def expiring(sub: Subscription) : Boolean = daysBetween(now,sub.expiry).getDays < 2 val nagList = subs.filter(expiring) val expiringTrials = subs.filter(expiring).filter(_.isTrial)

Slide 7

Slide 7 text

case class Sub(name: String, cc: Option[String]) val subs = List( Sub("Anna", None), Sub("Bob", Some("1234-5678-9123-4567")) ) def bill(cc: String) : Result = ... val results = subs.flatMap(s => s.cc).map(bill) val results = for { sub <- subs cc <- sub.cc } yield bill(cc) .par

Slide 8

Slide 8 text

2003 2006 2009 2008 2011 2004 2005 2010 2007 2012 2013 2014 1.0 2.0 2.3 2.8 2.7 2.9 2.10 2.11 2.6 2.5 2.4 2.9.3 2.8.2

Slide 9

Slide 9 text

The guy who built javac SpringSource VMware An advisor

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Ideas for starting 1. Small project trial 2. Mixed Java/Scala projects 3. For tests

Slide 12

Slide 12 text

@d6y @davegurnell @milessabin www.underscoreconsulting.com meetup.com/london-scala meetup.com/Functional-Brighton