Java vs Scala in the FP World

preview_player
Показать описание
In this live-coding session, Victor Rentea and Daniel Ciocîrlan will transform a procedural Java codebase into functional Scala code, discussing the Functional Programming best practices that have shaped the way the Scala language is designed. Then, these ideas will be reflected back to advance our coding style in Java too.

Both Victor and Daniel are heavy, experienced trainers on Java and Scala, respectively, so expect a debate on essential principles and advanced techniques whenever possible.

** Scala features in scope:
- one-liner functions
- every block is an expression - best practices
- val, not var
- switch, if and for should be used as expressions
- avoid Unit methods (side-effects)
- the _ notation and the Java Stream equivalent
- side-effects as a code smell

** Target Audience:
- Developers that recently/about to start writing Scala
- Developers aiming to deepen their FP knowledge
- Non-Java developers also (if Spartans)

** About The Speakers:

Note from Victor: Learning Scala caused one of the biggest leaps forward for my Java coding style, and I wanted to share with you some of that experience.

The event will be spoken in English. It will all be recorded and the recording link will be published in this event comments in a few days. But it’s a pity to watch it offline, because you won't be able to ask us live questioms.

The session will be highly interactive, so please join and contribute with as many questions and ideas in the chat.
Рекомендации по теме
Комментарии
Автор

Thank you victor and Daniel. That was awesome. Learnt a lot. Always a fan of victor and now Daniel. By the way I try to follow rockthejvm but sometimes things are more overwhelming when I don’t know the basics

heartlyu
Автор

the discussion about zero argument functions without parenthesis at time 50:00
Are there any rules about pure vs non pure there? I ran some experiments and it appeared to me that any zero argument method can be invoked without parenthesis (as if they are public fields)

In fact I wrote something like
object test {

def helloWorld(): Unit = println("hello, world!")

}

that I can invoke as

test.helloWorld

and it just prints the text as expected.

This is an impure function as far as I understood

debabratapani
Автор

What tool are you using for online IDE colaboration

jorgetovar
Автор

Really interesting hm can you do the same thing but this time compare Java to kotlin?)

neverbeenfrustrated