Thursday, December 28, 2006

Writing software for maximum system compatibility

For historical sake, here is a link to a program that compiles/runs in five languages. I'm sure it could be modified to also include whitespace.

1 comment:

Squirk said...

These kinds of "multi-lingual" programs are known as "polyglots" and there is relatively small collection at The Polyglot List.

It's not on the list, but I like this eight-language polyglot; it runs in Bash, Perl, Tcl, C++, ANSI C, Python and Literate Haskell. It's not valid Whitespace, but it is valid in a similar language which has a naughty name.