Please remove ability to multiple inheritance in Python 3000.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Every program can be designed only with single inheritance.
I also published this request at http://bugs.python.org/issue2667 18 1614
GD wrote:
Please remove ability to multiple inheritance in Python 3000.
I'm so happy *that's* a dead parrot, all right.
Stefan
GD schrieb:
Please remove ability to multiple inheritance in Python 3000.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Every program can be designed only with single inheritance.
Yes, sure. And that's why Java grew interfaces & it's class-diagrams are
hilariously complex. Because using single inheritance is so much better.
Diez
GD wrote:
Please remove ability to multiple inheritance in Python 3000.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Ah, one more:
"doctor, when I do this, it hurts!"
- "then don't do that!"
Stefan
Dnia Tue, 22 Apr 2008 04:07:01 -0700, GD napisa³(a):
Please remove ability to multiple inheritance in Python 3000.
Please send me 1 mln $.
I've always wanted to be rich and furthermore, I've got a lot of plans and
ideas how to spend that cash.
I also published this request at http://bugs.python.org/issue2667
I'll be not publishing the bug, as I don't want to leave trace, so that I
don't have to pay taxes.
With regards,
Cz@rny
GD a écrit :
Please remove ability to multiple inheritance in Python 3000.
Please dont.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Don't blame the tool for your unability to use it properly.
Every program can be designed only with single inheritance.
Every program can be implemented in machine code.
On Apr 22, 7:30 am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
GD schrieb:
Please remove ability to multiple inheritance in Python 3000.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Every program can be designed only with single inheritance.
Yes, sure. And that's why Java grew interfaces & it's class-diagrams are
hilariously complex. Because using single inheritance is so much better.
I have a couple issues with this, though I wholeheartedly agree with
the sentiment:
1. Java didn't grow interfaces, they were there from the start.
2. Java interfaces solve a different problem than MI (used properly)
does: interfaces are there to make types polymorphic, whereas
inheritance's main use is to share behavior.
Too many people believe polymorphism is the only noble goal of OO. If
that were true, there'd be no reason for multiple inheritance, or
single inheritance for that matter. But in my opinion, minimizing
code redundancy by allowing classes to share behaviors is far more
useful and important. That's why I wholeheartedly favor MI: it allows
classes to share behavior with restraints.
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Carl Banks
On Apr 22, 10:22*am, Carl Banks <pavlovevide...@gmail.comwrote:
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Not really; composition is usually a better way to share functionality
and reduce redundancy than inheritance.
George
On Apr 22, 10:36 am, George Sakkis <george.sak...@gmail.comwrote:
On Apr 22, 10:22 am, Carl Banks <pavlovevide...@gmail.comwrote:
Java (for example) allows a class to share behavior with only one
other class, and that *severely* limits the opportunities to minimize
redundancy.
Not really; composition is usually a better way to share functionality
and reduce redundancy than inheritance.
I should have known this was coming. I disagree: inheritance is a
much better way to share behavior. Use inheritance by default,
composition if you have to. (Or composition when it actually reflects
a composition relationship, and not mere behavior sharing.)
With composition you're burdening the user with having to learn the
shared relationships that ought to be implementation details of the
class. E.g.,
obj.action_style.perform_action()
With inheritance, the user doesn't have to worry about these
relationships.
obj.perform_action()
It's better to isolate complexity (which inheritance does) than to
spread it out (which composition does).
Carl Banks
I have a couple issues with this, though I wholeheartedly agree with
the sentiment:
1. Java didn't grow interfaces, they were there from the start.
I might have expressed myself wrong here - I should have written "needed
to introduce interfaces (right from the start)"
2. Java interfaces solve a different problem than MI (used properly)
does: interfaces are there to make types polymorphic, whereas
inheritance's main use is to share behavior.
But the *goal* of the polymorphy is mainly to have shared behavior. And
matter of factly e.g. in swing, you use inner classes that implement
most of the behavior you want, and override the few points where you
want differences - and then clumsily delegate to that inner class all
your interface-methods.
Diez
Carl Banks a écrit :
On Apr 22, 10:36 am, George Sakkis <george.sak...@gmail.comwrote:
>On Apr 22, 10:22 am, Carl Banks <pavlovevide...@gmail.comwrote:
>>Java (for example) allows a class to share behavior with only one other class, and that *severely* limits the opportunities to minimize redundancy.
Not really; composition is usually a better way to share functionality and reduce redundancy than inheritance.
I should have known this was coming. I disagree: inheritance is a
much better way to share behavior.
(snip)
With composition you're burdening the user with having to learn the
shared relationships that ought to be implementation details of the
class. E.g.,
obj.action_style.perform_action()
With inheritance, the user doesn't have to worry about these
relationships.
obj.perform_action()
(snip)
Unless you use composition + delegation (which is a PITA in Java and
close to a no-brainer in Python). In which case this is mostly
transparent to the user code.
Anyway, in Python, inheritence is kind of a special case of
composition+delegation.
On Apr 22, 11:10 am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
2. Java interfaces solve a different problem than MI (used properly)
does: interfaces are there to make types polymorphic, whereas
inheritance's main use is to share behavior.
But the *goal* of the polymorphy is mainly to have shared behavior.
Not at all. The goal of polymorphism is to have objects of different
types usable in the same situation. Two such classes might share some
behavior, but they don't have to.
Carl Banks
Carl Banks schrieb:
On Apr 22, 11:10 am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
>>2. Java interfaces solve a different problem than MI (used properly) does: interfaces are there to make types polymorphic, whereas inheritance's main use is to share behavior.
But the *goal* of the polymorphy is mainly to have shared behavior.
Not at all. The goal of polymorphism is to have objects of different
types usable in the same situation. Two such classes might share some
behavior, but they don't have to.
Of course they don't *have* to. Yet very often they do. But I should
have (again) worded that more cautiously.
When doing Java, using interfaces like the ones found in the collection
packages or e.g. HttpServletRequest and such usually leads to the
delegation-pattern I described. The same for swing. Generally, a lot of
code is written that declares first an interface & then some
Impl-classes of that - for the sole purpose of working around the
SI-caveats.
This shaped my viewpoint of interfaces - while on their own useful - as
a necessary crutch to create a MI-like features, that I wanted to
emphasize in this discussion.
Diez
On Apr 22, 1:07 pm, GD <gmarke...@gmail.comwrote:
Please remove ability to multiple inheritance in Python 3000.
Too late for that, PEPs are closed.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Every program can be designed only with single inheritance.
That's how the Java designers were thinking as well: If MI is allowed,
programmers will suddenly get an irresistible urge to use MI to write
unmaintainable spaghetti code. So let's disallow MI for the sake of
common good. Fortunately, Python is not designed to be fool proof
against fools. If you cannot use MI properly, then don't use that.
I also published this request athttp://bugs.python.org/issue2667
You reported MI as a bug???
sturlamolden wrote:
On Apr 22, 1:07 pm, GD <gmarke...@gmail.comwrote:
>Please remove ability to multiple inheritance in Python 3000.
Too late for that, PEPs are closed.
>Multiple inheritance is bad for design, rarely used and contains many problems for usual users.
Every program can be designed only with single inheritance.
That's how the Java designers were thinking as well: If MI is allowed,
programmers will suddenly get an irresistible urge to use MI to write
unmaintainable spaghetti code. So let's disallow MI for the sake of
common good. Fortunately, Python is not designed to be fool proof
against fools. If you cannot use MI properly, then don't use that.
>I also published this request athttp://bugs.python.org/issue2667
You reported MI as a bug???
The eventual disposition was "closed, invalid".
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
sturlamolden wrote:
On Apr 22, 1:07 pm, GD <gmarke...@gmail.comwrote:
>Multiple inheritance is bad for design, rarely used and contains many problems for usual users.
Every program can be designed only with single inheritance.
That's how the Java designers were thinking as well: If MI is
allowed, programmers will suddenly get an irresistible urge to use
MI to write unmaintainable spaghetti code. So let's disallow MI
for the sake of common good.
Argumenting like that, *all* programming languages had to be
outlawed. 8)
Regards,
Björn
--
BOFH excuse #391:
We already sent around a notice about that.
On Apr 25, 2:03 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n...@spamgourmet.comwrote:
That's how the Java designers were thinking as well: If MI is
allowed, programmers will suddenly get an irresistible urge to use
MI to write unmaintainable spaghetti code. So let's disallow MI
for the sake of common good.
Argumenting like that, *all* programming languages had to be
outlawed. 8)
James Gosling, grossed by C++ iostreams, also used this argument to
disallow operator overloading in Java (except for the String class).
That is why Python has NumPy and Java does not.
Nick Stinemates <ni**@stinemates.orgwrites on Thu, 24 Apr 2008 08:26:57 -0700:
On Tue, Apr 22, 2008 at 04:07:01AM -0700, GD wrote:
Please remove ability to multiple inheritance in Python 3000.
I hope your request will not be followed.
Multiple inheritance is bad for design, rarely used and contains many
problems for usual users.
Multiple inheritance is very productive by supporting mixin classes.
I use it extensively and get clean code quickly developped.
I hate Java because it does not support multiple inheritance
and forces me to write lots of tedious error prone delegations
to work around this limitation.
Dieter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Hung Jung Lu |
last post by:
Hi,
I think Microsoft did look into Python when they designed C#. (E.g.
they got rid of checked exceptions of Java.) However, they followed
Java in avoiding multiple inheritance (MI), which is a...
|
by: Taki Jeden |
last post by:
Hi
I'm trying to install a certain python program which uses gtk, and the
following line:
class view_tree_model(gtk.GenericTreeModel,gtk.TreeSortable):
raises a "TypeError: multiple bases...
|
by: km |
last post by:
Hi all,
In the following code why am i not able to access class A's object attribute - 'a' ? I wishto extent class D with all the attributes of its base classes. how do i do that ?
thanks in...
|
by: beliavsky |
last post by:
At http://www-03.ibm.com/developerworks/blogs/page/davidmertz David
Mertz writes
"Presumably with 2.7 (and later 2.x versions), there will be a means of
warning developers of constructs that are...
|
by: devicerandom |
last post by:
Hi,
I am currently using the Cmd module for a mixed cli+gui application. I
am starting to refactor my code and it would be highly desirable if
many commands could be built as simple plugins.
...
|
by: Guido van Rossum |
last post by:
python-list@python.org]
The first Python 3000 release is out -- Python 3.0a1. Be the first one
on your block to download it!
http://python.org/download/releases/3.0/
Excerpts:
Python...
|
by: Aaron Gray |
last post by:
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritance
Thanks,
Aaron
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |