42 Lines

Types everywhere

As we migrate more of our code away from JSF and towards Apache Wicket, I'm struck again by how nearly every architectural change we've made has been toward more strong typing and thus away from anything that a compiler can't verify. I'm getting pretty religious about this. One of the largest pains of maintaining a large code base is dealing with breakage in old code that no one has touched for ages. Things like:

<span>#{grab.some.fields.value}</span>

break silently, and unless you have a test verifying every chunk of UI (which can be pretty astable anyway, give how often ui designers like to change markup), you'll never catch it.

Now some will argue that IDEs can be made smart enough to catch this kind of thing. Ok, they can be made to be that smart but for the most part they aren't, and so long as we are supporting heterogenous build systems, we can't really rely on anything except the language itself, and the rules that make it compilable.

I get pretty religious about this...I don't even like Wicket's PropertyModels. They suffer from the same disease.

Now I am not necessarily opposed to Scala's inferred types...that's still strong typing. It's just smart strong typing.

Comments

properties

you should try bindgen as a type-safe replacement for wicket's PropertyModel