Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34159 > unrolled thread

Re: Simple example for nested "new" expressions?

Started byEric Sosman <esosman@comcast-dot-net.invalid>
First post2016-04-17 08:30 -0400
Last post2016-04-17 08:30 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Simple example for nested "new" expressions? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-04-17 08:30 -0400

#34159 — Re: Simple example for nested "new" expressions?

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2016-04-17 08:30 -0400
SubjectRe: Simple example for nested "new" expressions?
Message-ID<nevvf2$hb1$1@dont-email.me>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web