Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23899
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | markspace <markspace@nospam.nospam> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: lectures about "programming methodology" |
| Date | Tue, 07 May 2013 09:44:11 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 23 |
| Message-ID | <kmbaq7$uta$1@dont-email.me> (permalink) |
| References | <classroom-20130505192642@ram.dialup.fu-berlin.de> <lecture-20130506142026@ram.dialup.fu-berlin.de> <Scope-20130507002447@ram.dialup.fu-berlin.de> <51885ce2$0$32110$14726298@news.sunsite.dk> <aus49sFkjieU1@mid.dfncis.de> <lifetime-20130507144048@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Tue, 7 May 2013 16:40:39 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="fba3415ba68d85d643935af2f52f0b4b"; logging-data="31658"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19h3UnaHY7UcquowoiKb8pgRCi0rkm2EA8=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
| In-Reply-To | <lifetime-20130507144048@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:a2nGDZ3yoWkKT2lk8dQNdl4gfBU= |
| Xref | csiph.com comp.lang.java.programmer:23899 |
Show key headers only | View raw
On 5/7/2013 5:45 AM, Stefan Ram wrote:
> int f( final int i ){ return i == 0 ? 1 : i * f( i - 1 ); }
>
> . To understand this, it is vital to understand that »i« has
> only a single scope, but can have many (in this case:
> nested) lifetimes.
OK, I have to disagree with this. At minimum, I disagree that
"lifetimes" is the correct word here.
"Copy" is a better word than "lifetime." So is "stack frame." By the
time one wants to talk about recursion, introducing correct terminology
is the best way, imo. We just had a discussion here on c.l.j.p about
concurrency, and folks who can't keep track of what's on the stack and
what's on the heap have a hard time of it. Learning correctly is
important in school.
But I also agree more with the class instructor. "Scope" is the correct
term here. The scope of i is the body of the method f. That its value
may exist elsewhere is completely orthogonal to a discussion of scope.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-06 21:46 -0400
Re: lectures about "programming methodology" Sven Köhler <remove-sven.koehler@gmail.com> - 2013-05-07 13:45 +0300
Re: lectures about "programming methodology" Sven Köhler <remove-sven.koehler@gmail.com> - 2013-05-07 15:52 +0300
Re: lectures about "programming methodology" markspace <markspace@nospam.nospam> - 2013-05-07 09:44 -0700
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-07 21:37 -0400
Re: lectures about "programming methodology" David Lamb <dalamb@cs.queensu.ca> - 2013-05-07 18:10 -0400
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-07 21:38 -0400
Re: lectures about "programming methodology" Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-05-08 17:48 -0300
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-12 22:17 -0400
Re: lectures about "programming methodology" Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-05-17 19:35 -0300
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-17 18:53 -0400
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-17 19:02 -0400
Re: lectures about "programming methodology" Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-05-17 20:14 -0300
Re: lectures about "programming methodology" Arne Vajhøj <arne@vajhoej.dk> - 2013-05-17 19:29 -0400
Re: lectures about "programming methodology" lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-05-18 11:07 +0100
csiph-web