jvermeir (3) [Avatar] Offline
#1
Hi, I noticed the examples in chapter 1 use the var keyword to define variables. Though this works fine, I think there is value in introducing the val concept asap.

Immutability is important so it may be a good idea to start right away.
aslam.khan (50) [Avatar] Offline
#2
Re: Use of val instead of var?
Hi,

When to introduce immutability is a big decision in this book. This is a deliberate choice to not drop a statement that FP values immutability, and rather lead to why we value immutability.

I choose to introduce through a deliberate set of examples and principles in chapter two where we work towards referential transparency. I only make a distinction between val and var in chapter 3 when we actually start programming with immutable data.