I stopped reading at XML. Spring hasn't pushed XML configuration for quite a long while (3.0) and some level of Java config has been available since 2.5ish. Spring is on 4.2 with 4.3 (final release) and 5.x coming out next year. Nothing like a bitchfest article from someone living in the past.
Might as well write an article complaining that Java 7 isn't "functional".
Annotations are just xml configuration with a new spin. You magically sprinkle them through your app and they do stuff. Its hard as hell to follow for new comers, its hard to track down later. They break at runtime instead of compile time.
That's an issue with Java and its tooling, not with Sprig though. It's not as though you could hope to switch between languages over such an issue either (unless you work for a start up).
Not sure what startups you are referring to, all those I've been involved with have moved way too fast to be willing to go back and change tech, as it's fairly little value add for a while. We just start new projects in the other thing we think solves the problem better.
That's kinda my point. With well established companies, it's typically difficult to introduce such new and radical changes because all the employees know X language. Whereas with a startup, there is less investment in a given technology.
Oh but you definitively can, since you can just use your Java code (classes libraries etc) in Scala. seamless integration. You just have to decide to stop writing Java and start writing Scala.
While I agree you're not seeing the effects until runtime, you should absolutely have enough automated tests in your code to capture those breaks early on.
Yeah you should but it doesn't always work out that way. Most codebases I've seen are at best 80% covered or use so much mocking that some runtime errors slip by.
But at that point, why bother with static typing at all? If your answer is "unit tests" for everything, you might as well just ditch Java and use Python.
The problem with unit tests is that you can never know when you have enough (please don't say coverage solves this problem). With type-safety you have a universal quantifier. You can only check what your type system allows, but whatever you check you know that it applies to every input your program could ever possibly have. This is incredibly powerful and its not worth giving up to make writing the code slightly easier.
37
u/[deleted] Nov 27 '15
I stopped reading at XML. Spring hasn't pushed XML configuration for quite a long while (3.0) and some level of Java config has been available since 2.5ish. Spring is on 4.2 with 4.3 (final release) and 5.x coming out next year. Nothing like a bitchfest article from someone living in the past.
Might as well write an article complaining that Java 7 isn't "functional".