Functional Programming in Scala

preview_player
Показать описание
After 10 years of Object Orientated Java, 2 years of Functional Programming in Scala was enough to convince me that I could never switch back. But why? The answer is simple: Functional Scala lets you think less. It reduces the number of moving parts you need to hold in your head, lets you stay focussed and saves your mental stack from overflowing.

In this talk I'll show you how to stop treating Scala as a better Java and start exploring the world of Functional Programming. I'll use code examples to demonstrate a four step path that'll let you ease yourself into the world of Functional Programming while continuing to deliver production quality code.

With each step we'll learn a new technique, and understand how it leaves you with less to think about: Hopefully this talk will convince you that Functional Scala leads to code that's easier to hold in your head, and leave you excited about learning a new paradigm.

Original talk title: Thinking Less with Scala

--

Рекомендации по теме
Комментарии
Автор

Omg! This lecture just made me rethink what I’ve been doing for the past 12 years of my career.

I’m going to start a new big data project real soon. Is this something that can be applied in such a project?

talltk
Автор

for me div(a: Int, b: NonZeroInt): Int is more intuitive than returning Either[Error, Int]

aonodensetsu
Автор

Very useful presentation and neatly explaned. Thank you :)

prabhakaranrajendran
Автор

File1 Code -

class Abc {

//code

}

File2 Code -

Class Abc1 {


var a:Abc = null
try {
a = new Abc()
}

}

what does this line in file2 mean in scala "var a:Abc = null" where Abc is a class stored in file1

vrundashah
Автор

I'm not a Java developer. And I find Scala really easy

AjinkyaBorade
Автор

Explanation about functions is very clear

sirishareddy
Автор

Fantastic talk! Nicely structured and presented.

#FPFTW

DomainObject
Автор

20:04 - yes the compiler works pretty heavily, that's why I bought the 32 core AMD, the compiler works faster! It is a pleasure really.

no_more_free_nicks
Автор

This is a very good talk, I enjoyed it. But don't forget about stuff like this:

class WithFilter[K, +V, +IterableCC[_], +CC[_, _] <: IterableOps[_, AnyConstr, _]](
self: MapOps[K, V, CC, _] with IterableOps[(K, V), IterableCC, _],
p: ((K, V)) => Boolean
) extends IterableOps.WithFilter[(K, V), IterableCC](self, p) with Serializable

no_more_free_nicks
Автор

If the inc function is handed the max value of int as its parameter, it should result in an exception as well ... and therefore is not a pure function either

rickynuyens
Автор

Lol, i would never inmagine to see a PRL timed (50s? 60s?) Gazzete page on a Scala turorial :)

HenioGracie
Автор

More complex, but thought was interesting

Thesoccerdood
Автор

Which scala framework you recommend for rest api development?

KrishnaDasPC
Автор

1:48 - Has he maybe tried using an IDE?

Skiamakhos
Автор

scala community is like an alcoholics anonymous meeting

rollinOnCode
Автор

Dude! You clearly don't know how much a really good devops earn!

no_more_free_nicks
Автор

I still don't understand this madness called Functional Programming. If you function does something unexpected is because you have violated the Single Responsibility principle and/or named it wrongly. You don't need to add immutability to the mix and produce an awful lot of garbage.

MarcoWasd