Martin Odersky DIRECT STYLE SCALA Scalar Conference 2023

  Рет қаралды 12,925

SoftwareMill

SoftwareMill

Күн бұрын

Пікірлер: 35
@julianavar3836
@julianavar3836 Жыл бұрын
The man just proclaimed the end of the monad era
@ShotterManable
@ShotterManable Жыл бұрын
Thanks a lot for sharing it!!
@akemegbebu7807
@akemegbebu7807 Жыл бұрын
Game changer.
@tepan
@tepan Жыл бұрын
"My new Scala is much more user-friendly than Haskell. I don't like that." ~ Sheldon
@jaypandya1154
@jaypandya1154 Жыл бұрын
That was so cool
@jausmann
@jausmann Жыл бұрын
Storing the stack frame between break and boundary on the heap and then returning to it, is conceptually very similar to how an actor stores state and can pipe a future to itself. Perhaps delimited continuations are a special case of actor behavior being embedded in the language.
@lucianojoublanc4484
@lucianojoublanc4484 Жыл бұрын
Could you provide a reference for the papers? Is the first one "monads and composable continuations"?
@shilangyu
@shilangyu Жыл бұрын
Effect systems are the future of programming
@unorsk
@unorsk Жыл бұрын
[...] I refuse to use Either for errors, I think Either is terrible. And I want a Future that gives me as a result either a list of T or the error. [...]
@nilskp
@nilskp Жыл бұрын
What's wrong with Try?
@thomasjarvstrand1511
@thomasjarvstrand1511 11 ай бұрын
Doesn't Try only support Throwables as errors?
@Tvaroh
@Tvaroh Жыл бұрын
I don't know, all that "syntax" feels a bit weird, and I like "monads" much more. I'd rather write traverse instead of that stuff at 11:23 backed by exceptions. Not a fan of Rust error handling either, I think it's not very FP approach, I felt downgraded in a sense when writing code in Rust (but it's a revolutionary language considering its capability with borrowing checking, etc).
@simonwaddington1866
@simonwaddington1866 Жыл бұрын
I'm inclined to agree. Sometimes more code that's simpler and more self explanatory is good - at some point the syntax feels like there's some magic going on. But ultimately 90% of the code we write is hiding some magic so its down to. your comfort level with the paradigm. Seeing this for the first time my head was hurting quite a bit 🙂
@mrsozekaiser9299
@mrsozekaiser9299 Жыл бұрын
taticu, el padre, BO$$
@MorgenPeschke
@MorgenPeschke Жыл бұрын
This looks like it will quickly become a massive headache to debug.
@markhathaway9456
@markhathaway9456 Жыл бұрын
The people who first approach Scala say it's too complicated, so what do they do, they add more. Their rational is that they're "completing" the picture as is necessary, not on a whim. But most of those newbies leave. So, there's a trade-off. Now, if any new things make it harder (as with perhaps debugging) on current Scala users, will that chase them away or will they seek some other way of working around difficult features? Time will tell.
@MorgenPeschke
@MorgenPeschke Жыл бұрын
@@markhathaway9456 It'll be interesting to see how this gets used in non-trivial examples, but multiple exit points for loops/functions rarely increases the ability to mentally trace code when reading it (and help when debugging even less). I'm also really curious to see how `Break` will (or won't) avoid the issues with abstractions leaking that have lead non-local returns to be considered a code smell. When any try block can potentially break your abstraction, corner cases proliferate.
@jasonpickens9839
@jasonpickens9839 Жыл бұрын
@@MorgenPeschke Why would it be a headache? Current effect libraries are already a headache. The stack is incomprensible without some serious tricks. AFAICT continuations will restore the stack to how it was so it looks as you would expect.
@MorgenPeschke
@MorgenPeschke Жыл бұрын
@@jasonpickens9839 Yes, current effect libraries can be a headache, however this will likely be worse. The first (and least important) is that, depending on what you do with it, the stack is going to be mangled by patterns like the one at 16:52 or 19:00 so there isn't necessarily going to be an improvement there. This is without taking into account that effect libraries aren't obliged to ignore things like project Loom, so it's more likely than not that they'll be able to leverage it's capabilities to improve their stack traces, shrinking the gap even further. The bigger issue is that effect libraries (particularly monadic ones) are easier to mentally model and debug than imperative/mutable code because they actively limit the space of possible states the programmer has to keep track of. This is such a benefit that we put up with the mangled/unusable stack traces because we can mostly get along without them. Yes, the ability to break across effects is powerful, but the cost of that power is the loss of the predictability and composability that monadic effects offer. Even worse, it means you can exit a block in as many places as you could possibly imagine (including inside of function calls of arbitrary depths), which explodes the search space of possible states you have to keep track of when debugging. It's kind of like the difference between writing a tail recursive function and using foldLeft to accumulate a calculation over a collection. The tail recursive function is inarguably more powerful, however it's also much harder to debug, so it's a bad choice when you don't need that power. This is fine because the foldLeft is usually also easier to use. In this case, the ability to break across things like foreach instead of using something like traverse makes it look like this is the simpler approach. However, this is only the case when everything works correctly, and when in our industry has assuming things will always work correctly ever ended up in anything other than a massive headache?
@DAB009
@DAB009 Жыл бұрын
Need actor model locally
@web3tel
@web3tel Жыл бұрын
nice, but I like Unison approach better
@leonidburdinov3895
@leonidburdinov3895 Жыл бұрын
expand on this please
@TheSunscratch
@TheSunscratch Жыл бұрын
It looks like Scala is on its way to becoming the C++ of functional programming.
@jasonpickens9839
@jasonpickens9839 Жыл бұрын
Haha there is some truth to this but I do think that the Scala team do a good job of finding the most powerful abstractions that give us the greatest capabilities (can't wait for capture checking 😉). So yes the language does grow but I want a language that grows rather than one that grows stale. So long as redundant/obsolete features also get removed (there is evidence in this talk that they do).
@fredoverflow
@fredoverflow Жыл бұрын
On its way? Always has been!
@encapsulatio
@encapsulatio Жыл бұрын
@@fredoverflow And Clojure is in what way better?
@fredoverflow
@fredoverflow Жыл бұрын
@@encapsulatio Clojure and Scala/C++ are on complete opposites of the complexity spectrum (imho)
@abhijit-sarkar
@abhijit-sarkar 4 ай бұрын
11:14 - Why mention Rust, Rust is horrible. "I shall makest thy life unbearable by promising to solve the problems that thou dost not hast".
@user-uf4lf2bp8t
@user-uf4lf2bp8t 3 ай бұрын
Rust is amazing. It is just not for everything. Obviously, a garbage collector is preferred for most of the use cases of functional languages, but when you NEED a manually managed language, it doesn't get better than rust.
@MaksimVolkau
@MaksimVolkau Жыл бұрын
what scala is going to?... ah wait, it is the same direction :)
@encapsulatio
@encapsulatio Жыл бұрын
And what is your alternative, simpler solution?
@FirstLast-zs6dq
@FirstLast-zs6dq Жыл бұрын
Too raw talk. The main thought is tough to be tracked.
@markhathaway9456
@markhathaway9456 Жыл бұрын
Are you saying it's hard to debug or just hard to understand the overall ideal final product?
@klasus2344
@klasus2344 Жыл бұрын
I don't like it 😬
@pr0master
@pr0master Жыл бұрын
Way too complicated. I will stick to Kotlin.
Martin Odersky SCALA HAS TURNED 20  - Scalar Conference 2024
30:51
SoftwareMill
Рет қаралды 3,1 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
The Death of Monads? Direct Style Algebraic Effects
17:13
Impure Pics
Рет қаралды 20 М.
What Can Scala Learn from Rust? by John A. De Goes
59:03
Ziverge
Рет қаралды 12 М.
Scala: Beyond the basics with Christopher Batey
48:05
Devoxx
Рет қаралды 49 М.
Martin Odersky - Scala's Role in the Programming Languages Ecosystem
45:53
Scala Days Conferences
Рет қаралды 13 М.
The purest coding style, where bugs are near impossible
10:25
Coderized
Рет қаралды 1 МЛН
Martin Odersky - Simply Scala
57:59
ScalaIO FR
Рет қаралды 12 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.