3

I wonder why scala.util.parsing.combinator.testing.RegexTest has a main method.

Aren't library classes intended to be called from within the program and not run separately as an independent executable?

soc
  • 27,983
  • 20
  • 111
  • 215

1 Answers1

4

That's not the only one. One I particularly like is scala.swing.test.UIDemo. I really, really don't think they ought to be bundled with the library, but they are. Basically, they are examples you can run directly:

scala scala.swing.test.UIDemo
Daniel C. Sobral
  • 295,120
  • 86
  • 501
  • 681
  • +1 because I agree they shouldn't be bundled. Maybe bundle them separately with examples, but not with the main library. – Rex Kerr May 20 '11 at 23:53