I had to do a ton of work to determine what I should actually pass to the method, and it made my life unpleasant.
Working with a library on a duck typed language has this exact same problem. While static typing has its warts, this is one advantage it does have over duck typing.
Why are those args not properties? Why havn't these properties been set somewhere else line by line? Why doesn't the library choose some sensible default values?
Java is so full of bullshit it boggles the mind, I love the way he presents this little 'gem' in the article:
Wow! so easy! yes, all I need to do to use it is find a fucking processor factory (whatever the FUCK that is) and a fucking server transport (can't you just give me a default??)
You see, Java is so fucking verbose and hard to read, it actually needs static typing and all this contractual shit just to make it understandable. Better languages are just readable and do useful shit in fewer lines, as a result, you can easily check the definition to see what a method does.
5
u/[deleted] Dec 07 '08 edited Dec 07 '08
I agree here, and I hate agreeing with Ted.
I recently had to work on a soap proxy class generated by a crappy WSDL. All of the methods had signatures like this:
I had to do a ton of work to determine what I should actually pass to the method, and it made my life unpleasant.
Working with a library on a duck typed language has this exact same problem. While static typing has its warts, this is one advantage it does have over duck typing.