Skip to content
0:00 / 0:00

#scala#martinodersky#codingstyle

Martin Odersky: Scala with Style

InfoQ

234K subscribers • 64 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Martin Odersky, creator of Scala
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

102K views13 years ago2 recommendations

Programming languagesSoftware designScalaFunctional programmingObject-oriented design

Martin Odersky shares his perspective on writing idiomatic Scala, discussing the transition and fusion between object-oriented and functional programming styles.

What does it mean to have good style in Scala? Well, who better to help answer that question than its creator! Martin Odersky visited SF Scala to share his perspective on getting the most out of this incredibly complex, and powerful, programming language. This talk is a repeat of the keynote Martin gave at Scala Days 2013. He says, that in today's programming paradigm, we are in a transition period between imperative/object-oriented and functional programming. In the end, he predicts a fusion between both styles. Find out why! **Check this out for more of the latest in Scala: marakana.com/s/tags/scala

Why it's here

2 people recommend this

What people say. Recommended for understanding idiomatic Scala style and the creator's perspective on infix notation and language design.

Moments people linked to

u/aabil11in r/scala • Recommends

Preferred style for Infix notation, for higher-order functions. Scala allows "infix notation" where the dot and parenthesis can be left off of methods that take exactly 1 parameter. What is the preferred style for infix notation vs "." when it comes to chained higher order functions? According to scala-lang.org, the preferred is infix notation: `// wrong! names.map { _.toUpperCase }.filter { _.length > 5 }` `// right! names map { _.toUpperCase } filter { _.length > 5 }` However, according to the man himself, the preferred is ".method(...)" for chained operators. Personally, I agree with Odersky here. I think using the dot notation actually makes things much more readable. Which do yo…
20View on Reddit

u/ivanovich_ivanin r/scala • Recommends

…use it for many other applications such as Akka HTTP for web services and Akka in general for distributed apps. I hold some convictions about scala in general and other frameworks and I just want to cross verify and what the future holds for scala. 1) Scala was never designed to be an upgrade to Java From martin odersky's lecture back in 2013 - link to this video - Scala was never designed to be a better Java - We have Kotlin trying to do that - Not a haskell on the JVM - Eta lang I found this to be reflecting how the real world works. Some things are better done with FP and some things are better done in OOP. So on this aspect, it does not compete with Kotlin nor Haskell/Eta lang. What are yo…

u/amazedballerin r/scala • Mentions

On “Learning Scala without knowing Java”

> Any caveats I should be aware of? Similar to /u/hyperforce, don't get sucked into FP libraries like Scalaz or cats or shapeless. Keep it to the Scala standard library and only venture out into FP territory when you feel it gives you a real advantage. Martin Odersky has an excellent series of videos that talk about Scala idioms and styles that you can find on Youtube, for example link to this video -- he also has a course on Coursera. I also found Another Tour of Scala to be a big help in getting familiar with Scala from an overview perspective.

u/i_am_nicky_haflingerin r/scala • Mentions

On “Why does Scala not pivot to a purely functional language?”

Lots of good answers already. That said this Odersky talk, while old, does a nice job of addressing the balance he was trying to strike in the language. link to this video

u/Re4XNin r/scala • Mentions

On “Resources for learning Scala?”

Ah, I've already seen the first one! It was a pretty cool introduction and the spokesman made everything easy to grasp. I went ahead and later re-implemented some of the patterns he showed. I also saw Scala with Style, which was pretty insightful. I'll take a look at the subreddit you mentioned, thanks!
2View on Reddit

u/aabil11in r/scala • Mentions

On “Is mutability really THAT bad?”

I agree. The creator of Scala said as much. Key takeaway is "don't demonize local state"
2View on Reddit

u/aabil11in r/scala • Mentions

On “Is mutability really THAT bad?”

Yes I agree, in certain cases mutable can be more readable, and as I mention in another comment Odersky himself said the same. When you have something like a function that has a non-static local variable you can't expect that to do much harm. Which is why I find the above quote so hilarious.
2View on Reddit

u/CarminHuein r/scala • Mentions

On “Functional Programming : What are side effects?”

There was an interesting thought about this in one of Odersky's talk: link to this video Here he says that it is immutable if it gives the same result always despite that we have a mutable map in the class. I never thought about this I just assumed that if I use var or mutable then that's mutable but this sounds somewhat reasonable.
1View on Reddit

u/amazedballerin r/scala • Mentions

On “Was Kotlin really what Scala was supposed to be?”

It is literally a hyperlink in the above post. link to this video * link to this video * link to this video * link to this video * link to this video