HeadlinesBriefing favicon HeadlinesBriefing.com

Country Codes as Programming File Extensions

Hacker News •
×

The ISO 3166-1 alpha-2 standard assigns a two-letter country code to nations and regions worldwide. These codes are commonly seen in top-level domain names (e.g., .im for the Isle of Man) and platforms like Discord. Coincidentally, the Rust programming language uses `.rs` as its file extension, which aligns with the code for Serbia. This observation sparked curiosity about other programming languages whose file extensions match these country codes.

Several languages and file types share this curious overlap. For instance, `.am` is the code for Armenia and also used by Automake. `.ec` represents Ecuador and is associated with ECMAScript. Poland's code, `.pl`, is used for Perl, PL/I, and Prolog. Python uses `.py`, matching Paraguay, while Ruby uses `.ru`, for Russia. Other examples include `.in` for Autoconf (India), `.md` for Markdown (Moldova), `.mk` for Makefile (North Macedonia), `.mm` for Objective C (Myanmar), and `.sv` for System Verilog (El Salvador).