<html><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /></head><body bgcolor="#FFFFFF" text="#000000"><p dir="ltr">In words of one syllable, what is basically the problem with global variables? Is it simply that they're open to be changed by anything in the system?</p>
<br><br><div class="gmail_quote">On June 3, 2015 9:17:49 AM EDT, Rick Troth <rmt@casita.net> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="moz-cite-prefix">On 06/02/2015 03:38 PM, R P Herrold
wrote:<br />
</div>
<blockquote cite="mid:alpine.LRH.2.03.1506021537130.1740@bjyevire.pbz" type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true" style="font-family: -moz-fixed; font-size: 12px;" lang="x-unicode">
<pre wrap=""><a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.safetyresearch.net/blog/articles/toyota-unintended-acceleration-and-big-bowl-%E2%80%9Cspaghetti%E2%80%9D-code">http://www.safetyresearch.net/blog/articles/toyota-unintended-acceleration-and-big-bowl-%E2%80%9Cspaghetti%E2%80%9D-code</a>
Toyota had more than 10,000 global variables.</pre>
</div>
</blockquote>
<br />
There was a discussion on LinkedIn about the (lack of) code quality
in embedded systems. The thread was started by a guy outside of
Cleveland who owns a firmware company. <br />
<br />
<blockquote cite="mid:alpine.LRH.2.03.1506021537130.1740@bjyevire.pbz" type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true" style="font-family: -moz-fixed; font-size: 12px;" lang="x-unicode">
<pre wrap="">“And in practice, five, ten, okay, fine. 10,000, no, we're done. It is
not safe, and I don't need to see all 10,000 global variables to know
that that is a problem,” Koopman testified.
-- Russ herrold</pre>
</div>
</blockquote>
<br />
I've seen global variable abuse in commercial code. (not just
embedded) <br />
<br />
I am shocked to have encountered "go global" thinking among
professional software developers. Kind of wonder if some aspects of
object oriented design are knee jerk reaction the other way. <br />
<br />
-- R; <><<br />
<br />
<br />
<br />
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><br />colug-432 mailing list<br />colug-432@colug.net<br /><a href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a><br /></pre></blockquote></div></body></html>