Author Topic: <-- Archived -->  (Read 20539 times)

0 Members and 1 Guest are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: -PyTFall- Dev Thread: Next Day/Jobs Concept
« Reply #60 on: June 06, 2013, 03:21:46 AM »
Since I started this whole discussion, I would like to reiterate that I am not trying to force a design for this game that relies heavily on inheritance. I belief that some shared base classes would be beneficial, but in the end it's up to the main contributors to decide which design they want to use. Based on my limited knowledge that would make it Xela's decision, and I will not oppose it.
Nevertheless, I agree with everything mijh said in the last post. Not using inheritance or at least some standardization by convention will very likely cause problems with debugging and code improvement in general.

Quote
at least some standardization

That I do not mind at all. Just as long as we do not take it to far.


I also can really identify with this statement:
So with all that said, I would like to point out that I definitely enjoy using inheritance in my code.

I know (seen Pytherworld). While I can respect the order, paradigm and beauty of it, working on a project like that to me would be a nightmare. It might change in the future but for now I enjoy a bit of mess in the code as long as I can clearly understand it and it comes with no bugs.

@Xela That's one of the (less important) reasons why inheritance makes so much sense to me ;-)

 :)

Well, I've never claimed that proper programming practices or inheritance don't make much sense, my point is and continues to be that all I see when I look at code that uses inheritance whereever possible is boredom (and often confusion).
« Last Edit: June 06, 2013, 05:09:47 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4730
Re: -PyTFall- Dev Thread: Next Day/Jobs Concept
« Reply #61 on: June 06, 2013, 06:44:02 AM »
Sorry, Rudi, I don't want to turn the thread into an abstract discussion. Mostly because I really not in a mood for that, so maybe some other time  :)

You could google "inheritance disadvantages" if you want to. I don't say that inheritance is bad thing or something, but it has its own limitations when used excessively, as any other principle.

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: -PyTFall- Dev Thread: Next Day/Jobs Concept
« Reply #62 on: June 06, 2013, 08:56:16 AM »
@DarkTl
So you really think Python is limited because everything is an object? I've never heard someone make that point before, but that may be due to my limited knowledge. The only possible disadvantage I can think of is performance, but you can always write the performance critical function in C if you really need it (which, I suspect, most people don't).
AFAIK, accusing Python of limited functionality or flexibility is just uninformed. If I find time I'll google a bit, but I think you should do the same  ;)

UPDATE:
I read Wikipedias section on the limitations of inhertance-based designs link.
Some of the described limitations are examples of problematic design (yo-yo-problem, using classes to model roles) which will always give you problematic code regardless of the paradigm you follow. Multiple inheritance can cause problems, but it is usable in Python if you need it, so the Singleness critique does not really apply. Python does not care about the Visibility problem because "we're all consenting adults".
In constrast to these problems, the problems mijh described are hard to avoid and (without shifting paradigms, which is very hard in itself) hard to fix.

 
« Last Edit: June 06, 2013, 10:08:20 AM by rudistoned »