mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.6K
active users

fuzzix

Damian Conway's keynote at was very much up to his usual high standard:

youtu.be/0x9LD8oOmv0

I don't want to give too much away for those who haven't seen it (stop reading here if you like to go in *fresh*), but I already miss smartmatch and I never even really used it...

@fuzzix

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.

@fuzzix

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 There are also multi methods in clojure, but strangely enough I rarely use them. Somehow the powerful pattern matching is still missing. Sure, there are other libraries that solve the problem, but somehow they haven't really caught on in the #clojure community.

@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.

@fuzzix The next interesting step would be to add constructs from logic programming (like in #prolog) 😉

@fuzzix

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.