Skip to content

Commit

Permalink
Merge pull request twitter#8 from jeffstyr/fix-link-and-small-correct…
Browse files Browse the repository at this point in the history
…ions

Update URL for Jonas Bonér cake pattern article
  • Loading branch information
mariusae committed Apr 12, 2012
2 parents badb276 + da49806 commit d2fdf6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions effectivescala.mo
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ emphasizes the transformation of values over stateful mutation,
yielding code that is referentially transparent, providing stronger
invariants and thus also easier to reason about. Case classes, pattern
matching, destructuring bindings, type inference, and lightweight
closure and method creation syntax are the tools of this trade.
closure- and method-creation syntax are the tools of this trade.

### Case classes as algebraic data types

Expand Down Expand Up @@ -1128,7 +1128,7 @@ The use of `flatMap` in `Future`s is discussed in the

## Object oriented programming

Much of Scala's vastness lie in its object system. Scala is a *pure*
Much of Scala's vastness lies in its object system. Scala is a *pure*
language in the sense that *all values* are objects; there is no
distinction between primitive types and composite ones.
Scala also features mixins allowing for more orthogonal and piecemeal
Expand All @@ -1138,7 +1138,7 @@ time with all the benefits of static type checking.
A motivation behind the mixin system was to obviate the need for
traditional dependency injection. The culmination of this "component
style" of programming is [the cake
pattern](http://jboner.github.com/2008/10/06/real-world-scala-dependency-injection-di.html).
pattern](http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di/).

### Dependency injection

Expand All @@ -1151,7 +1151,7 @@ It's boring and simple and it works. *Use dependency injection for
program modularization*, and in particular, *prefer composition over
inheritance* -- for this leads to more modular and testable programs.
When encountering a situation requiring inheritance, ask yourself: how
you structure the program if the language lacked support for
would you structure the program if the language lacked support for
inheritance? The answer may be compelling.

Dependency injection typically makes use of traits,
Expand Down

0 comments on commit d2fdf6f

Please sign in to comment.