David… reminiscent of old times, you can feel ignored once again ;-)

Seriously though, I am not disagreeing here with you or any one else with 
regard to the problems that global variables can create. I am just once again 
saying, don’t throw the baby out with the bath water. Globals, in my opinion, 
do have valid uses. If used judiciously, with emphasis on judiciously, they 
should not create any problems for me now or others inheriting my code in the 
future.

One thing that I do for my own benefit is to always insure that  my global 
variable names clearly describe the global's intended use, scope, and in some 
cases longevity.

John

> On Jul 21, 2017, at 5:10 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Sat, Jul 22, 2017 at 12:56 PM, John Baughman via 4D_Tech 
> 4d_tech@lists.4d.com> wrote:
> 
>> Lacking a computer science background
> 
> 
> ...me too.
> 
> 
>> My point is that none of the hammers are evil nor should any “be avoided
>> like the plague”. Each has a place in my tool shed. I have a very basic
>> understanding as to why a global variable can be problematic. For this
>> simpleton it is all in one’s overall approach to the task at hand… less is
>> best.
>> 
> 
> Most of you won't know this, but I used to live in the same town as John
> and we would go to lunch regularly. Coding would come up a lot. I have to
> say, John and I tended to disagree about pretty much everything, top to
> bottom. And, for what it's worth, I can't think of a person I've met who
> more easily took up new tools and languages and managed to come up with
> novel solutions that were good for his customers. He's also taken over Flex
> and 4D projects I started, so he knows where I've buried the bodies ;-)
> Anyone that enjoyed John's popular "Tips & Tricks" presentations years back
> at the Summit should remember that John is, above all, pragmatic, not
> dogmatic.
> 
> So, I know perfectly well that when I tell John he's "wrong", he'll ignore
> me ;-)
> 
> The evils of globals come up faster when you have messy code and/or
> multiple coders. Same with bad parameter passing, etc. You can put up a ton
> of scaffolding to trap and handle coding mistakes. Or you can just not make
> mistakes and strip out all of the guardrails.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to