Getting rid of `new`?

Mark "Justin" Waks
1 min readMar 3, 2019

--

On the Dotty-discussion front: there is a fascinating conversation going on, over on Scala Contributors, about the possibility of deprecating and eventually removed the keyword new from Scala. The conversation has been winding along for a week or so now, and has actually gotten to the point of concrete proposals of how it might work.

On the one hand, I don’t think a change like this is essentialnew has been part of the language from the outset, and most folks just use it without comment.

OTOH, it’s clear that there is some latent demand for such a thing, from the common anti-pattern of case class abuse: where people write a mutable class with lots of functions as a case class, just so that they can avoid having to write new. (I’ll wear my opinion on my sleeve here: case class should be reserved for immutable data structures.)

So I’m of mixed minds here. Folks who are interested in the notion should check out the discussion…

--

--

Mark "Justin" Waks
Mark "Justin" Waks

Written by Mark "Justin" Waks

Lifelong programmer and software architect, specializing in online social tools and (nowadays) Scala. Architect of Querki (“leading the small data revolution”).

Responses (1)