From f5d5de59c04ef290d902231be0c575577d816d39 Mon Sep 17 00:00:00 2001 From: rdfriesen <33337600+rdfriesen@users.noreply.github.com> Date: Thu, 8 Nov 2018 18:11:45 -0500 Subject: [PATCH] typo fixes (#21166) --- guide/english/cplusplus/clean-code-guidelines/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/english/cplusplus/clean-code-guidelines/index.md b/guide/english/cplusplus/clean-code-guidelines/index.md index f7fe3f7081..8dd9152095 100644 --- a/guide/english/cplusplus/clean-code-guidelines/index.md +++ b/guide/english/cplusplus/clean-code-guidelines/index.md @@ -34,7 +34,8 @@ int cucumber; // global variable "cucumber" ## Using goto, continue, etc. -This is an usual discussion among programmers, just like global variables, these types of statements are usually considered bad practice. +This is a usual discussion among programmers, just like global variables, these types of statements are usually considered bad practice. + They are considered bad because they lead to ["spaghetti code"](https://en.wikipedia.org/wiki/Spaghetti_code). When we program we want a linear flow, when using those statements the flow is modified and lead to a "twisted and tangled" flow. @@ -75,7 +76,8 @@ for (int i = 1; i <= 5; i++) ## Declare constants and types at the top They are usually declared after libraries, this makes them be together and easier to read. -For local variables it happens the same, declare them at the top (Other people preffer it declaring them as later as possible in order to save memory see: [cplusplus.com](http://www.cplusplus.com/forum/general/33612/) + +For local variables it happens the same, declare them at the top (Other people prefer it declaring them as later as possible in order to save memory see: [cplusplus.com](http://www.cplusplus.com/forum/general/33612/) ## Use only one return function at the end