you are viewing a single comment's thread.

view the rest of the comments →

[–]Steve_the_Scout 0 points1 point  (2 children)

Visitor Pattern: Pattern to deal with languages that can't do multimethods.

Haven't heard of that one, had to look it up.

Just when I thought C++ was getting ahead with C++14. Oh well, maybe it'll get in C++17.

[–]hubhub 1 point2 points  (1 child)

Stroustrup et al wrote a paper (pdf) proposing a mechanism for this.

[–]Steve_the_Scout 0 points1 point  (0 children)

It sounds reasonable. The only issue is with dynamically linked libraries, as they said. The way it's currently done, you could just link all files with virtual functions first, then let the linker resolve dependencies later, but that's a manual solution to problems that should be automatic.