Live data from Hacker News

Hands-on Scala Programming

handsonscala.com

31–40 of 108 posts

Re: Hands-on Scala Programming

#31

Earlier quoted context omitted.

"In what way does Scala have Python's convenience and Go's concurrency" - I think that is exactly what the book is trying to teach you. There are some pretty good examples in the free chapters

Oh wow, okay I'll take a look at the book then.

I think the world needs, "Scala, the Good Parts". Hope this book is it.

Re: Hands-on Scala Programming

#32
post #28
post #2

I didn't post this, but cool to see this up here! The full book is ~400 pages and will be released Summer 2020 (i.e. soon!). If you're interested in being notified when it comes out, there's a mailing list link on the page and I'll let you know when it's out. There will be both E-Books as well as paperbacks & hardcovers (assuming the supply-chains are still open in this COVID-19 global environment...) The first 5 cha…

Will this be a good book to learn your first functional language?

Yes!

We use a lot of functional techniques in this book, but we do not dwell on them. In the end you will be using functional techniques not because they’re interesting, but because they’re the obvious and easy. That is how functional programming should be!

Re: Hands-on Scala Programming

#33
post #23

This book has a section on "Why Scala" but not on "Why Functional Programming". What is interesting about Scala, if you already know Java (and most CS grads already do), is that Scala is a functional language. Anyone know of a good book or article that gives an overview of functional programming and answers the question of "Why Functional Programming", without going into details any one functional language?

As someone who has been in the functional programming world for a long time I don't think you can really understand it without some time using it. Beginners tend to focus on language features (immutability, first class functions, map instead of loop, etc.) but it's really a completely different approach to programming than imperative programming. A paradigm shift, in the original sense of the word.

It is also difficult to talk about concepts without some notation, and a notation is exactly what a programming provides (as well as other things)!

That said, several people have attempted to write about it. John Hughes' "Why Functional Programming Matters" is one that often comes up. There are a million versions of this floating around the web. Here is one: https://www.youtube.com/watch?v=bL-CcjKW1lw

I gave a talk on this topic, with examples in Scala: https://www.youtube.com/watch?v=bL-CcjKW1lw

This paper is about the idea of paradigm shifts in programming, and is beautiful and profound, though not about functional programming: https://www.dreamsongs.com/Files/Incommensurability.pdf

Re: Hands-on Scala Programming

#34
post #17

Earlier quoted context omitted.

If you like simpler languages, you'll probably hate Scala. It's one of the most complex out there.

Kotlin is probably a better route if you're considering a non-Java JVM language. Its simple, has easy access to the Java ecosystem, and avoids the complexities of the scala FP purists.

   avoids the complexities 
   of the scala FP purists.
Are you sure? Have a look at Arrow [1] and similar! I am glad that languages offer pure FP frameworks, so I can use them if I think they are the right tool for the job, and can avoid them otherwise. It's an important software engineering choice which style of programming to use, especially with multi-paradigm languages. But the language should not enforce them!

[1] https://arrow-kt.io/

Re: Hands-on Scala Programming

#36
post #14

Earlier quoted context omitted.

If you like simpler languages, you'll probably hate Scala. It's one of the most complex out there.

On the other hand you may like Kotlin. It has a lot of what makes Scala good with less of the bits that make it bad.

This is down voted, but for someone wanting to learn a Scala like language, it delivers most of the capability with less complexity and tooling problems.

I still prefer Scala, but found Kotlin to be enjoyable to write as well. Probably a perfect gateway into Scala if that's an eventual goal too.

Re: Hands-on Scala Programming

#37
post #34
post #17

Earlier quoted context omitted.

Kotlin is probably a better route if you're considering a non-Java JVM language. Its simple, has easy access to the Java ecosystem, and avoids the complexities of the scala FP purists.

avoids the complexities of the scala FP purists. Are you sure? Have a look at Arrow [1] and similar! I am glad that languages offer pure FP frameworks, so I can use them if I think they are the right tool for the job, and can avoid them otherwise. It's an important software engineering choice which style of programming to use, especially with multi-paradigm languages. But the language should not enforce them! [1] htt…

While Arrow exists I don't think its representative of the community overall.

Re: Hands-on Scala Programming

#38
post #24

Some context for people who have limited knowledge of Scala. Lihaoyi is one of the most prolific coder's, not just in Scala, but in any language. He looks like he is much to humble and modest to claim so himself, so I will do it for him. Here is a by no means exhaustive list of projects - A buildtool - A bash replacement that speaks Scala - A test framework - A parsing library - Ports of several python libraries in S…

So your list of already existing everywhere projects is an argument for Scala ease ?

Sorry but saying a dude on github has to do a test framework or port libraries, convince me Scala isn't ready.

Re: Hands-on Scala Programming

#39
post #38
post #24

Some context for people who have limited knowledge of Scala. Lihaoyi is one of the most prolific coder's, not just in Scala, but in any language. He looks like he is much to humble and modest to claim so himself, so I will do it for him. Here is a by no means exhaustive list of projects - A buildtool - A bash replacement that speaks Scala - A test framework - A parsing library - Ports of several python libraries in S…

So your list of already existing everywhere projects is an argument for Scala ease ? Sorry but saying a dude on github has to do a test framework or port libraries, convince me Scala isn't ready.

I think the parent is just giving background about the author of the book, who wrote all of those tools mentioned. I don't think they're only trying to convince you that Scala is easy, but maybe I'm reading it incorrectly.

Re: Hands-on Scala Programming

#40
post #37
post #34

Earlier quoted context omitted.

avoids the complexities of the scala FP purists. Are you sure? Have a look at Arrow [1] and similar! I am glad that languages offer pure FP frameworks, so I can use them if I think they are the right tool for the job, and can avoid them otherwise. It's an important software engineering choice which style of programming to use, especially with multi-paradigm languages. But the language should not enforce them! [1] htt…

While Arrow exists I don't think its representative of the community overall.

Neither is cats in Scala.

Most Scala programmers are probably just maintaining Play apps or using Apache Spark, with no pure FP in sight. The pure FP contingent is just very active and vocal online.

Post reply on HN