4 ms·
I'm going to disagree with you there. Idiomatic code is so called, because people familiar with the language can quickly read it. It makes reading code a much
by ORioN63 11y ago
I'm going to disagree with you there.
Idiomatic code is so called, because people familiar with the language can quickly read it. It makes reading code a much lighter task.
Frameworks are a different thing. Frameworks build around its host language, but normally are meant to use in a specific way. In its own idiomatic way.
- coldtea 11y ago>Idiomatic code is so called, because people familiar with the language can quickly read it. It makes reading code a much lighter task. In the case of Java circa 2000-2006 it needlessly messed up code, making it more difficult and slow to read EVEN for people familiar with the language. Following conventions doesn't make code better to read automatically just because people are already familiar with them -- those conventions should be good in the first place for that to happen. Node has the callback hell "idiom" many are familiar with. And yet if somebody rewrote the code with async, await, even the people "familiar" with callbacks would be able to read it faster and understand it better.
- mattkrea 11y agoI don't think this is universal as it hasn't applied where I work. Without understanding how promises work they are no easier and it doesn't help that many things exists that do not use the standard .then() and .catch().
- coldtea 11y agoAsync/await is not the same as bare promises though with then() and catch.