It's not a "shortcoming" of the language per se. Visitor is a mitigation of the Expression Problem[0] on the Object Oriented spectrum. Object oriented designs need to use Visitor to add functionality to existing data structures, whereas doing such is a natural feature of Functional languages (though FP languages have their own awkward angle in attempting to add new data structures to existing functionality). This is a big motivator for most modern programming languages supporting multiple design paradigms.
[0] https://eli.thegreenplace.net/2016/the-expression-problem-an...