pmcrtr (1) [Avatar] Offline
#1
On page 5 of the freely available chapter under the heading Don't get scared by syntax, I think it would be much nicer for the Scala code to be defined as:

def inc(n: Int) = n + 1

It's still valid Scala and it does exactly the same but it's less verbose and compares much more favourably with the accompanying Haskell and Clojure equivalents. As the aim is for the reader to not be scared of the syntax I think it may be best to use the cleanest version of the syntax where possible.

Also, on page 10, in the first REPL example, the integer n is defined as a var. The following lines of code then reference n but don't attempt to mutate it. That being the case, there is no reason why n can't be specified as a val. With one of the cornerstones of FP being immutability, using immutable vals over mutable vars whenever possible is good practice. I think it would be worth adhering to that as early as possible in the book's examples to guide the reader towards thinking in terms of immutability.
aslam.khan (50) [Avatar] Offline
#2
Re: Verbosity and mutation
I originally did use val but opted for var at this stage because it immutability is not a familiar concept for OOP developers. In chapter 2 we converge towards immutability and in chapter 3 we draw attention to val vs var and encourage val from that point onwards.

I'd be keen to hear from others whether the introduction of val this early introduces a point of confusion or clarity.
DhavalDalal (1) [Avatar] Offline
#3
Re: Verbosity and mutation
I think Aslam thats fair to assume the use of var - the way you put OO people at ease with the evolution towards FP is really gentle....its gentle nudging to FP, step-by-step. Overall the tone and learning gradient is just nicely balanced.
477764 (24) [Avatar] Offline
#4
The useful information of the logic that Printable August 2017 Calendar Printable September 2017 calendar Printable July 2017 Calendar happens to the useful information
477764 (24) [Avatar] Offline
#5
On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. August 2017 calendar template
September 2017 calendar template July 2017 Calendar Template You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command.


open
the
door
its
me
hey
baby
hello
listen
dear
check
your
email
there
is
something
special
you
will
like
this