Polyglot

From Esolang
Jump to navigation Jump to search

A polyglot is a program that is acceptable to the specifications of more than one programming language. Usually, when executed, a polyglot does exactly the same thing in every language in which it can be run.

There's also special form of polyglot, which is a mixture of polyglot and quine: a polyglot quine. Polyglot quines are mostly more complicated to write than normal polyglot programs due the nature of a quine. Naturally polyglot quines need to produce the exactly same output in every language part of the polyglot quine.

External resources