Visitor pattern: Difference between revisions

Content added Content deleted
m (→‎{{header|Raku}}: use a proper wikilink for Wikipedia)
Line 36: Line 36:


=={{header|Raku}}==
=={{header|Raku}}==
Raku implements [https://en.wikipedia.org/wiki/Multiple_dispatch#Raku multiple dispatch] so the visitor pattern is perhaps not as useful/necessary there. That said, it can be done fairly easily.
Raku implements [[wp:Multiple_dispatch#Raku|multiple dispatch]] so the visitor pattern is perhaps not as useful/necessary there. That said, it can be done fairly easily.


(Largely based on an [https://github.com/jonathanstowe/raku-patterns/blob/master/Behavioural/Visitor/visitor-simple example published by Johnathan Stowe].)
(Largely based on an [https://github.com/jonathanstowe/raku-patterns/blob/master/Behavioural/Visitor/visitor-simple example published by Johnathan Stowe].)