From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.63.13 with SMTP id a13mr11007388ici.28.1416515628635; Thu, 20 Nov 2014 12:33:48 -0800 (PST) X-Received: by 10.140.19.110 with SMTP id 101mr5098qgg.9.1416515628458; Thu, 20 Nov 2014 12:33:48 -0800 (PST) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!uq10no2063421igb.0!news-out.google.com!w7ni50qay.0!nntp.google.com!w8no1197226qac.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 20 Nov 2014 12:33:48 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: What is your opinion on Global Objects? From: sbelmont700@gmail.com Injection-Date: Thu, 20 Nov 2014 20:33:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:190878 Date: 2014-11-20T12:33:48-08:00 List-Id: For what it's worth, I'm in the "pass everything as an argument" camp (and really functional programming in general), and loathe the 'hidden state' setup, for the following reasons: 1. You are hardcoded to a particular implementation (i.e. no dispatching) 2. You always end up needing a second object, no matter much you think you don't think you will. 3. The majority of the program becomes impure 4. Things that access global objects are way more complex to try and test 5. Everything is compile-time constant (i.e. no creating or deleting things dynamically). -sb