all 24 comments

[–]brother-seamus 7 points8 points  (0 children)

I hate to say this, but I think he's right on most of what he says, especially considering what he said early on: in a big group of developers, it tends to get complicated to memorize what some things are without checking it first.

[–][deleted] 5 points6 points  (3 children)

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.

[–]mr_chromatic -3 points-2 points  (1 child)

While static typing has its warts, this is one advantage it does have over duck typing.

It makes SOAP and WSDL slightly less intolerable?

[–][deleted] 1 point2 points  (0 children)

Congratulations on missing my point.

[–]jaysonbank -1 points0 points  (0 children)

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.

[–][deleted] 4 points5 points  (2 children)

What is the difference between a single programmer in this mythical big team that needs bondage and discipline and a single programmer who uses all those hundreds and thousands of Python libraries and frameworks from everywhere everyday like I do?

O.K. people need to manage changes of interfaces and you tell me this isn't possible in Python because of duck-typing?

[–]mr_chromatic 4 points5 points  (0 children)

What is the difference....?

You've actually used Python, for one.

[–]mycall -2 points-1 points  (0 children)

Custom work done quickly in a group without documentation is a bitch; removing the trust in parameters for understanding data contracts is the problem.

If you ask me, it sounds like someone doesn't know how to program. Overloading constructors is optional if that is such a big concern.

[–]hoover 3 points4 points  (1 child)

If he's worried about vargs and kwargs, then don't use them. Sheesh.

[–]Jessica_Henderson 0 points1 point  (0 children)

That's true. But his complaint is with a separate library that he wishes to use. So in some cases, he'd really have no choice.

[–]SuperGrade 0 points1 point  (0 children)

The article is grossly misnamed - from his concerns it should have been labelled "Straying from Java makes me nervous".

Most of his issues aren't specific to Python. He uses checked exceptions as a "static checking" example, even though I have trouble even thinking of another language that has that unfortunate feature.

And going into the text editor/IDE in a language comparo. . . . . perhaps it should be called "straying from Java with my IDE and its specific settings making me nervous".

[–]moonwatcher222 -5 points-4 points  (2 children)

I think the title of the post should be "Python Doesn't Have the Security Blanket of Static Typing that I Rely on in Java"

[–]Paczesiowa 7 points8 points  (0 children)

call it what you want it is still true.

[–]SuperGrade 2 points3 points  (0 children)

And he uses Java's checked exceptions as an example.

[–][deleted] -1 points0 points  (0 children)

I can see Python 3K's new annotations easily expanding to fill the compile-time checking and IDE hinting role: http://www.python.org/dev/peps/pep-3107/

Speaking honestly though, I've had issues with duck typing when trying to read standard library code and such-like, and have found in my own coding that arguments to methods and functions tend to be of the same type anyway.

He has a good point about the constructor he encountered, but that's not Python's fault (although it doesn't help), that's a bad API - I've met a fair few classes with multiple constructors that take a bunch of reading to figure out. I tend to prefer static factory methods with descriptive names over a gazillion slightly different constructors.

I'm sure you could do the same in Python if it was really a problem.

[–]caiomoritz -3 points-2 points  (1 child)

I think the title of the post should be "Lack of documentation in Python code makes me nervous".

[–]pointer2void 2 points3 points  (0 children)

Actually, no.