3 ms·
Forgive me for asking a stupid question: what does it mean when something is “idiomatic” in a programming language context? Is it just the best or recommended w
by fermienrico 6y ago
Forgive me for asking a stupid question: what does it mean when something is “idiomatic” in a programming language context? Is it just the best or recommended way to do something? Or is it something that’s supported by the language? Or something else?
- grzm 6y agoIdiomatic in a programming language means pretty much what it means in any other language: how would someone fluent in the language express it? In a programming context, that may also correspond to the most performant or otherwise "best" expression, but sometimes it's just a commonly used style or phrase.
- millstone 6y agoA programming language idiom is a pattern or technique that you expect your readers to know, even if it isn't obvious when encountered for the first time. Here's an idiom: for (int i=0; i < 10; i++) We all instantly know this means loop 10 times, from 0 through 9. But on first read it takes a little work to figure out what's happening.
- ClumsyPilot 6y agoI was struggling with that too initially - replace the word with 'standard' or 'natural' and it retains the same meaning.