idioms: intro improvements (#304)

This commit is contained in:
Marco Ieni 2022-03-17 13:54:57 +01:00 committed by GitHub
parent 482c2b8720
commit b440ed2dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,14 +1,14 @@
# Idioms # Idioms
[Idioms](https://en.wikipedia.org/wiki/Programming_idiom) are commonly used [Idioms](https://en.wikipedia.org/wiki/Programming_idiom) are commonly used
styles and patterns largely agreed upon by a community. They are guidelines. styles, guidelines and patterns largely agreed upon by a community.
Writing idiomatic code allows other developers to understand what is happening Writing idiomatic code allows other developers to understand better what is
because they are familiar with the form that it has. happening.
The computer understands the machine code that is generated by the compiler. After all, the computer only cares about the machine code that is generated
The language is therefore mostly beneficial to the developer. by the compiler.
So, since we have this abstraction layer, why not put it to good use and make Instead, the source code is mainly beneficial to the developer.
it simple? So, since we have this abstraction layer, why not make it more readable?
Remember the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle): Remember the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle):
"Keep It Simple, Stupid". It claims that "most systems work best if they are "Keep It Simple, Stupid". It claims that "most systems work best if they are