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](https://en.wikipedia.org/wiki/Programming_idiom) are commonly used
styles and patterns largely agreed upon by a community. They are guidelines.
Writing idiomatic code allows other developers to understand what is happening
because they are familiar with the form that it has.
styles, guidelines and patterns largely agreed upon by a community.
Writing idiomatic code allows other developers to understand better what is
happening.
The computer understands the machine code that is generated by the compiler.
The language is therefore mostly beneficial to the developer.
So, since we have this abstraction layer, why not put it to good use and make
it simple?
After all, the computer only cares about the machine code that is generated
by the compiler.
Instead, the source code is mainly beneficial to the developer.
So, since we have this abstraction layer, why not make it more readable?
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