48
8
A polyglot is a program that can be run in 2 or more different programming languages.
What general tips do you have for making polyglots, or choosing languages that are easy to write polyglots for a specific task?
Please post the tips that could be applied in most situations. I.e. they shouldn't work only in polyglots of two specific languages. (You could simply post an answer to a polyglot question if you have a too specific tip.) But you can introduce features of a language that makes it easy to work with many languages, or easy to be added to any existing polyglots.
Please post one tip per answer. And feel free to suggest edit if a language-specific tip also applies to another language.
2The first line there shouldn't have a semicolon. – None – 2016-11-26T03:00:45.697
True. Good point – dexgecko – 2016-11-26T03:08:26.320