Like look at this crap https://refactoring.guru/design-patterns/visitor
The described "problem" here is just. Why wouldn't you... write a function instead of a method. What
@socks I don't understand where you'd want to use a function instead of a method
thing is, these patterns exist for corporate codebases that have to be worked on by a lot of people and like, comply with regulations, you won't always end up with the most convenient solution
@socks but you won't convince execs that they should ditch a language they've been successfully using for 10-20 years
@noiob I am also aware of this!
@socks can you typecheck for a type of function though?
@noiob Depending on the language, yeah, easily
@socks interesting, I don't think I ever used one that could
@noiob Yeah and this is (one reason) why Java sucks to use!
The type checking is fine, you can have polymorphic functions