Re:Rust is now overall faster than C in benchmarks
by fermienrico on Sunday January 03, 2021 @07:51PM
(#25626819)
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?
[ Parent
| on HN ]
Re:Rust is now overall faster than C in benchmarks
by grzm on Sunday January 03, 2021 @07:55PM
(#25626844)
Idiomatic 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.
Re:Rust is now overall faster than C in benchmarks
by millstone on Monday January 04, 2021 @01:05AM
(#25628311)
A 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.
Re:Rust is now overall faster than C in benchmarks
by ClumsyPilot on Monday January 04, 2021 @06:00AM
(#25629779)
I was struggling with that too initially - replace the word with 'standard' or 'natural' and it retains the same meaning.