I've heard the expression "idiomatic XYZ" used a lot, where XYZ is the name of some computer language. For example, "for element in iterable: do_something(element)" in Python rather than the traditional C-like loop that uses an index. But a lot of these examples aren't really idioms -- they are just more natural constructs that are well-known and defined in the language. There's no need for a compiler or interpreter to figure out "what you're really trying to do" in order to implement it well.<p>So I'm looking for examples of truly idiomatic code in computer languages --- something where a fluent programmer would easily understand what is going on at a high level, but you'd have to program a compiler or interpreter to "recognize" the construct in order to treat it more efficiently than the language definition would imply.<p>The only one I can think of, off the top of my head, is Array.prototype.slice.call(arguments) in Javascript (e.g. https://stackoverflow.com/questions/7056925/how-does-array-prototype-slice-call-work) which makes a real Array object out of a function's arguments, which are not an Array.