On Tue, 24 Sep 2013 08:29:39 -0700 Andrei Alexandrescu <[email protected]> wrote:
> On 9/23/13 11:32 PM, Jacob Carlborg wrote: > > On 2013-09-23 19:53, Andrei Alexandrescu wrote: > >> I think this is debatable. For one, languages such as Java and C++ > >> still have built-in "new" but quite ubiquitously unrecommend their > >> usage in user code. Far as I can tell that's been a successful > >> campaign. > > > > Since when is it _not_ recommended to use "new" in Java? > > http://goo.gl/KVmAom > Uhh, that's JavaScript, not Java. From what I can tell, the arguments seem to be very specific to JavaScript, ie, centering around prototype-inheritance and implicit declarations. Paulo's comment about preferring dependency injection makes sense (Although they'd still get new'ed anyway, just at some other point, right?). Were there other reasons?
