In a message of Mon, 12 Oct 2015 19:35:57 -0600, Michael Torrie writes: >On 10/12/2015 06:07 PM, Steven D'Aprano wrote: >> Where is the "vast amounts of noise" added to the code? > >Well in Java code for one. No wonder they require auto-completion. >Java class-based namespaces must be a nightmare to work with. That and >all the over-use of design patterns that Java libraries love to do, >though in fairness Java requires a certain amount of boilerplate to do >things like singletons and factories, whereas Python can often just use >a module.
When Design Patterns were new, the 2 of the first books to come out were 'Design Patterns'[1995] which was C++ focused, and the 'Design Patterns Smalltalk Companion'[1998]. If you read the two of them, side by side (as DPSTC asks you to) you will be struct by how little of the C++ code is about 'here is the pattern I want to implement' and how much is 'here is what to do to bash the C++ type system into submission' -- to the point where a couple of DP are files, in the Smalltalk version as 'for Smalltalk this is only a few lines of code, not enough to really be a pattern (and I bet you do this all the time without thinking that you were using a Design pattern, don't you?)'. The Smalltalk versions are all so much sorter. And Smalltalk, like Python is a strongly and dynamically typed langauge. Thus it is no wonder that the DP get used more than they need to in the java world. No matter what you write you will have to write the 'and then get it past the type checking' part, and grabbing a well-tested one of those saves you from a lot of bugs, even if you have to take and overly-heavy and complicated DP to go along with it. Laura -- https://mail.python.org/mailman/listinfo/python-list