I have been toying around with scala the last couple of weeks. I have read the book, wrestled with the gui, and I am now trying to build myself an application stack.
I think the last gamechanger to appear in the software business was TDD – in the sense of writing tests at all. All of a sudden, a team could accelerate instead of getting bogged down in endless regression tests.
So here I am, having a look at a brand new language, and what do I find? The scala libraries have not been instrumented for testing. A small example: If I send a message to an actor, there is no easy to assert in a test that a message should have been sent (that I can find), much less to access it and test the contents.
I remember way back, when I did hardware. We had something called JTAG. JTAG is basically a series of glorified registers that are placed on all outputs and inputs of a module. In normal operation, the registers just sit there. There is a trivial speed cost of having the extra hardware there, and as such, they are just in the way. Total waste.
But when enabled, the registers come alive, letting a tester sense the input and set the outputs of the register. An ASIC designer can inspect the insides of a fairly complex ASIC. All it takes is a couple of electrical connections on the periphery, and all digital design libraries have these structures. But I am digressing.
In the software world, we lack even this basic test standardization. Every last developer has to build his own test harnesses on top of his test bed instead of leveraging well-tested harnesses written by professionals. The best we have are addons like jmock to help us out. It shouldn’t be like this when we design a new language. We should put this in from the start. I want to be able to go ActorService.enableTesting , which would give me access to all messages being sent.
I wish the day had more hours. I wish I had the time to write this myself.