I see the phrase \"programming idiom\" thrown around as if it is commonly understood. Yet, in search results and stackoverflow I see everything...
From micro:
<
It comes from idiomatic the meaning of the word idiom in programming can be summed up as phrase that carries meaning and implications that is more than the sum of the words. In programming most code snippets are actually idiomatic. 'Pertaining or conforming to the natural mode of expression of a language'
A Programming idiom can be considered descriptive of a class of solutions that is transferable to different cases. Consider while { ... }
vs do {} while
these are idiomatic, they contain the same words but the ordering carries an important distinction. The exact phrasing will differ by language, but the fundamental meaning and implications will differ; for example do {} while
will always be executed once, no matter what language or statements are used to implement it. As an idiom it is transferable shape of an idea. It could be used in many circumstances, and expressed with different words (statements/commands) but the fundamental result will always be the same.