A programming idiom is "the way" (or one of "the ways") to write a basic, commonly-recurring construct in a particular programming language or set of related languages. An idiom is not a programming paradigm nor is it, in general, an algorithm.