Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23899
| From | markspace <markspace@nospam.nospam> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: lectures about "programming methodology" |
| Date | 2013-05-07 09:44 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <kmbaq7$uta$1@dont-email.me> (permalink) |
| References | (1 earlier) <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> |
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