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


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

Re: Simple example for nested "new" expressions?

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Simple example for nested "new" expressions?
Date 2016-04-17 08:30 -0400
Organization A noiseless patient Spider
Message-ID <nevvf2$hb1$1@dont-email.me> (permalink)
References <nested-new-20160416024157@ram.dialup.fu-berlin.de>

Show all headers | 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


Thread

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

csiph-web