Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23888
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail |
|---|---|
| From | Sven Köhler <remove-sven.koehler@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: lectures about "programming methodology" |
| Date | Tue, 07 May 2013 15:52:26 +0300 |
| Lines | 26 |
| Message-ID | <ausbobFm7j5U1@mid.dfncis.de> (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 |
| X-Trace | news.dfncis.de Oha5JZLR+2UDCa5avRuTCQ+LQbME3v+Nqwt47Ob2UhSOy7RCLvJ2znKqIc |
| Cancel-Lock | sha1:UhzIZd9k9v4rclL3SKppSV9eNx4= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 |
| In-Reply-To | <lifetime-20130507144048@ram.dialup.fu-berlin.de> |
| Xref | csiph.com comp.lang.java.programmer:23888 |
Show key headers only | View raw
On 05/07/2013 03:45 PM, Stefan Ram wrote:
> Sven Köhler <remove-sven.koehler@gmail.com> writes:
>> BTW: It is also possible to defend his description of the scope, namely
>> if you limit it to local variables only (Stefan's counter example was a
>
> For local variables the two concepts differ too. One example
> can already be seen in my code, when one reads the local
> parameter »i« as a local variable. The most famous example
> is the factorial (untested):
>
> 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.
That is correct. But then again, I'm not sure how this professor will
explain it. To be consistent with his definition of scope, he might
explain to the students, that there are many "incarnations" of i, each
"living" from the { to the }, i.e. the scope. In his way of thinking,
this might be consistent with saying that the scope defines the lifetime
of i (namely each incarnation of i).
Regards,
Sven
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