I think Multi::Dispatch (or Switch::Right) might become my favourite perl module.
That's why I love e.g. #erlang and #raku, for example, and I've always wanted something like that for perl. I hope it becomes a permanent part of #perl language at some point.
Edit:
Although I also find the AI part of the presentation interesting. It plays with the possibilities of how AI might change programming in the future. I've often thought about this myself often.
I also find this extremely powerful, especially for dynamic programming languages. I also have the feeling that I had much less programming difficulty in erlang due to the powerful pattern matching (somewhat different from multi multimethods). You divide a complex algorithm into many individual small algorithms.
@fuzzix I also think that because you actually programme much more recursively in erlang (or are forced to do so by the language), you think very differently when you programme in this way. So for me, this type of programming feels extremely natural and extremely declarative to describe an algorithm. I find such code extremely easy to understand and follow.
Ok, I hadn't thought about that. What about Multi::Dispatch and the call stack? Does the module prevent call-stack overflow errors in recursive multimethods calls (e.g. by goto or TCO)?
@fuzzix I just don't understand why given/when blocks with smartmatch disappear from Perl when you can basically "replace" them with Multi::Dispatch as shown in the video? Why don't you just adapt the given/when construct? I think I had already said this a few weeks ago, without knowing about Multi::Dispatch. I was already pointed to another alternative solution. ok, Damian has explained why the current smartmatsch logic is not so cool. But why not simplify it all?
@fuzzix
ok, I've now reached the end of the video. Damian is simply a genius. Yes, Switch::Right is exactly what I want given/when construct to be.