As an iOS developer, I see a lot of old answers in Objective-C, often accompanied with new Swift version, which may be in many different Swift versions too (Swift 2, Swift 3, etc.)
I'm sure this is not the only example, as there are Java and Kotlin in Android questions (and not just them), Gradle/Gradle KTS, etc. And I believe in future there'll be more of such examples.
I think that answer syntax should adopt to it. In most of modern documentations you can switch between Swift and Objective-C (e.g., developers.google.com), and I think in the same way it should be possible to switch between language variants on posts (if there're some). User should be able to specify preferred languages that should be selected in such cases.
Existing examples of this kind of feature:
From Google Developer documentation:
Image may be NSFW.
Clik here to view.
From Symfony's documentation:
Image may be NSFW.
Clik here to view.
I'm not very good in Markdown, so maybe I've reinventing something that already exists, but as we can specify language like
```swiftcode```
Probably we could've use something like
```swiftswift code```obj-cobj-c code```
I'm not sure how hard is it to implement the new design for such feature, but seems like something we should have.
This is indeed a duplicate of add-a-means-for-tab-stacking-code-snippets. I haven't found it by myself. Sadly it's still open after six years and looks like it doesn't have enough attention.