r/programming • • Dec 06 '08

Python Makes Me Nervous

http://teddziuba.com/2008/12/python-makes-me-nervous.html
4 Upvotes

24 comments sorted by

View all comments

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:

void Method(object arg1, object arg2, object arg3)

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.

0

u/jaysonbank Apr 09 '09 edited Apr 09 '09

You shouldn't need so many arguments, the whole point of OOP is you can split things up into separate methods and make other things default.

 void Method(object arg1, object arg2, object arg3)

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:

 protected TServer(TProcessorFactory processorFactory, TServerTransport serverTransport)

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.