mirror of
https://github.com/rust-unofficial/patterns
synced 2024-11-14 18:12:46 +00:00
idioms: intro improvements (#304)
This commit is contained in:
parent
482c2b8720
commit
b440ed2dba
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user