Article View: alt.folklore.computers
Article #620760Re: Nostalgia
From: Jorgen Grahn
Date: Fri, 02 Mar 2018 14:31
Date: Fri, 02 Mar 2018 14:31
30 lines
2866 bytes
2866 bytes
On Tue, 2018-02-27, J Clarke wrote: > On 27 Feb 2018 12:15:31 GMT, Jorgen Grahn <grahn...@snipabacken.se> > wrote: ... >>> So are variable names that form parts of common words. Second, once >>> the habit develops, it's easy to run out of variable names and end up >>> using "l" (lower case L), which is identical to "1" (one) in many >>> fonts which can lead to very difficult to identify bugs. >> >>Hm, I've never seen that problem arise. It would indeed be a problem, >>and a symptom of an underlying problem. Generally, I limit the number >>of variables in scope at any given time, because code is harder to get >>wrong when there are few moving parts. > > You seem to have learned programming in the era in which "scope" > actually existed. When I learned, variables were usually global. Yes. I did some BASIC programming in the late 1980s with (IIRC) only one-letter globals, but after that there was usually proper scoping. (And instructors who warned us about the evils of globals.) Nowadays I tend to use C++ or the 1999 C standard; these both give you tools to limit variables to small scopes, and to make them constant if you never intend to change them. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
Technical Details
Message-ID:
<slrnp9io2n.eu5.grahn+nntp@frailea.sa.invalid>Path:
mbox-mo1.pugleaf.net!a25ni786itj.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<2MWdnbgKEKQjRA_HnZ2dnUU78XHNnZ2d@giganews.com> <ffga3cFrifbU1@mid.individual.net> <ffgu5uF5nalU15@mid.individual.net> <1313349967.541300884.430961.peter_flass-yahoo.com@news.eternal-september.org> <p6vrnc$ue5$1@dont-email.me> <slrnp97b4c.eu5.grahn+nntp@frailea.sa.invalid> <0lq79dpae03ai000r0690fja58qcud4udu@4ax.com> <slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid> <3ve99dtbi7vu0jda6ut1kcbemr6j4ta28v@4ax.com> <slrnp9aiv3.eu5.grahn+nntp@frailea.sa.invalid> <p8la9dhdunvee3pcj9ra816vq5p0rp2k5g@4ax.com>Show Full Headers
Complete Article Headers
X-Received: by 10.107.44.75 with SMTP id s72mr3819174ios.10.1520001113696; Fri, 02 Mar 2018 06:31:53 -0800 (PST) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 10.107.164.230 with SMTP id d99ls1830131ioj.18.gmail; Fri, 02 Mar 2018 06:31:52 -0800 (PST) X-Received: by 10.107.143.82 with SMTP id r79mr3984053iod.120.1520001112795; Fri, 02 Mar 2018 06:31:52 -0800 (PST) MIME-Version: 1.0 Path: mbox-mo1.pugleaf.net!a25ni786itj.0!nntp.google.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jorgen Grahn <grahn...@snipabacken.se> Newsgroups: alt.folklore.computers Subject: Re: Nostalgia Date: 2 Mar 2018 14:31:51 GMT Lines: 30 Message-ID: <slrnp9io2n.eu5.grahn+nntp@frailea.sa.invalid> References: <2MWdnbgKEKQjRA_HnZ2dnUU78XHNnZ2d@giganews.com> <ffga3cFrifbU1@mid.individual.net> <ffgu5uF5nalU15@mid.individual.net> <1313349967.541300884.430961.peter_flass-yahoo.com@news.eternal-september.org> <p6vrnc$ue5$1@dont-email.me> <slrnp97b4c.eu5.grahn+nntp@frailea.sa.invalid> <0lq79dpae03ai000r0690fja58qcud4udu@4ax.com> <slrnp97s31.eu5.grahn+nntp@frailea.sa.invalid> <3ve99dtbi7vu0jda6ut1kcbemr6j4ta28v@4ax.com> <slrnp9aiv3.eu5.grahn+nntp@frailea.sa.invalid> <p8la9dhdunvee3pcj9ra816vq5p0rp2k5g@4ax.com> X-Trace: individual.net r4T5FzTN4fO6B0ULIfBe0w7mYJv07lPDATX++zNVulpZ+H/4WU Cancel-Lock: sha1:EPpyL0NL5loBY2IvqLdliNYSlo0= User-Agent: slrn/1.0.2 (OpenBSD) Bytes: 2390 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit