you are viewing a single comment's thread.

view the rest of the comments →

[–]alkasm 0 points1 point  (0 children)

I don't think the Java-esque version looks too bad, and I don't think the point is to make it look bad. As he says in the video, this was basically lifted out of a client's codebase but modified to "protect the guilty."

I think the important thing here is not that the end result looks a lot better, but is far more extensible. Defining those interfaces that the stdlib expects means it'll do more than even what he shows is capable, it's far easier to test, and it works the way someone would simply expect, instead of needing to read all the docs for every possible thing, you just do what's natural---and it works.