patterns/idioms
simonsan de7519f5d9
Add introductions (#117)
Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com>
2021-01-02 12:15:33 +01:00
..
concat-format.md Fix a slight typo 2018-12-14 15:27:48 -05:00
ctor.md Update vec.rs path 2019-03-05 15:25:54 -06:00
default.md Show call of default() 2020-03-05 11:28:58 +01:00
deref.md Deref polymorphism anti-pattern 2015-11-01 21:31:24 -05:00
dtor-finally.md Rewrite mentions of try! macro to use ? operator 2020-02-06 16:56:39 -06:00
mem-replace.md Added comment to explain second example 2017-01-01 05:26:33 +01:00
on-stack-dyn-dispatch.md Fix broken links (#105) 2020-12-31 12:41:09 +01:00
option-iter.md option-iter: Fix typo in extend example 2017-11-28 11:11:23 +02:00
pass-var-to-closure.md Small title fix 2016-09-27 16:01:35 +13:00
priv-extend.md Prepending _ to field name avoids unused field warning 2016-10-09 12:51:01 +02:00
README.md Add introductions (#117) 2021-01-02 12:15:33 +01:00
rustdoc-init.md Fix typos 2020-08-10 11:57:37 +03:00
temporary-mutability.md Reword to be more formal, use 'redefine' instead of 'rebind' 2019-04-20 22:41:02 +07:00

Idioms

Idioms 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.

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?

Remember the KISS principle: "Keep It Simple, Stupid". It claims that "most systems work best if they are kept simple rather than made complicated; therefore, simplicity should be a key goal in design, and unnecessary complexity should be avoided".

Code is there for humans, not computers, to understand.