Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34159
| Path | csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Simple example for nested "new" expressions? |
| Date | Sun, 17 Apr 2016 08:30:16 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <nevvf2$hb1$1@dont-email.me> (permalink) |
| References | <nested-new-20160416024157@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Sun, 17 Apr 2016 12:27:14 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="17761"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ImU8AMeaiNbjAY5guDq06" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
| In-Reply-To | <nested-new-20160416024157@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:H1lB0rYaIw3/KnScVRzrlPVDeI0= |
| Xref | csiph.com comp.lang.java.programmer:34159 |
Show key headers only | View raw
On 4/15/2016 10:09 PM, Stefan Ram wrote:
> I am searching for a simple example for the nesting of »new«
> expressions, but it should not require the explanation of
> certain »advanced« features, such as exceptions, GUI
> classes, type arguments or class declarations.
> [...]
I've been mulling this over and reading other responses, and I've
come to the belief that Robert Klemme is right: There is nothing
special about "nested new," so it's probably a mistake to make a
fuss over it in a class setting. Calling a constructor with an
argument that is itself newly constructed is ... well, would you
make a special case out of applying `+' to operands that are
themselves sums? If you give special treatment to a situation that
is completely ordinary, I think you risk confusing your students.
Something here reminds me of a snippet from "The Goon Show."
Paraphrased:
NEDDIE: I was minding my own business, when *suddenly* ...
MUSIC: [ominous minor chords: DA DA, DA-DA-DAAAH!]
NEDDIE: ... nothing happened!
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: Simple example for nested "new" expressions? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-04-17 08:30 -0400
csiph-web