Hacker News new | comments | show | ask | jobs | submit login

If you aspire to make Java into the type of language we would arrive at if we redesigned Java from scratch today, it's not just a matter of adding good features but also removing bad ones.

For example, you'd go directly to Joda-Time or JSR-310. Date and Calendar wouldn't be present at all.

Whether Java should break compatibility to remove all the old cruft I'm not sure. The benefits of the cleaner design might not be worth the costs/inconvenience.

I'm glad you added that last line, because that's basically the whole story. Java is /very/ backwards compatible, and it's got round the...errr...quirks of the early versions by having a massive ecosystem of alternative implementations. Some of these (like Joda-Time) are good enough to get widely accepted as the 'correct' implementation. I don't think anyone will argue when you say that that throws up some barriers to entry, but they're not massive barriers, the standard library does still work. Not having to rewrite your code every six months is much more important.

Is there any major language out there that actively removes old/bad parts of it's standard library?

None that have been successful, and this is the nub of the problem.

It's like Soupstrain said: there are only two kinds of languages: the ones people complain about and the ones nobody uses.

A side effect of success is having a large body of existing code to consider when making changes.

Scala? It's still a very young language, though.

Oh, but it's introduced plenty of quirks of its own, which will have to be painfully removed down the line. Odersky himself is trying to redo and simplify the type system with his Dotty project.

What have they removed from the standard library? Just curious.

It's more a case of replace than remove...

Just compare the ScalaDoc of different Scala versions.

Things which come to mind (comparing roughly 2.8 (released 2010-07) to 2.11 (released 2013-03)):

Classes (just from the top-level scala.* package):

  - Application
  - Cell
  - cloneable
  - CountedIterator
  - NotDefinedError
  - NotNull
  - Responder
  - serializable
Complete packages:

  - scala.actors and subpackages
  - scala.collection.interfaces
  - scala.concurrent (still exists, but its contents have been replaced completely)
  - scala.dbc and subpackages
  - scala.mobile
  - scala.reflect.generic
  - scala.swing and subpackages
  - scala.testing
  - scala.text
  - scala.util.automata
  - scala.util.continuations
  - scala.util.grammar
  - scala.util.logging
  - scala.util.parsing and subpackages (includes parser combinators and JSON)
  - scala.util.regexp
  - scala.xml
(This of course doesn't include things which were demoted from scala to other namespaces like scala.util, scala.runtime, scala.annotations ...)

The list is certainly incomplete anyway...

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact