![]() |
|
Introduction to class polymorphism - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: PHP (https://sinister.li/Forum-PHP) +--- Thread: Introduction to class polymorphism (/Thread-Introduction-to-class-polymorphism) |
RE: Introduction to class polymorphism - 1llusion - 07-22-2013 (07-22-2013, 01:35 AM)The Alchemist Wrote: Why are interfaces recommended? Why not classes? Huh? I mean implementing interfaces into classes such as: PHP Code: class foo implements bar{
// code
}
Interfaces don't have any functionality on their own
RE: Introduction to class polymorphism - 1llusion - 07-22-2013 (07-22-2013, 01:35 AM)The Alchemist Wrote: Why are interfaces recommended? Why not classes? Huh? I mean implementing interfaces into classes such as: PHP Code: class foo implements bar{
// code
}
Interfaces don't have any functionality on their own
RE: Introduction to class polymorphism - The Alchemist - 07-22-2013 (07-22-2013, 01:56 AM)1llusion Wrote:(07-22-2013, 01:35 AM)The Alchemist Wrote: Why are interfaces recommended? Why not classes? Oops(no pun intended), I got confused with something else. RE: Introduction to class polymorphism - The Alchemist - 07-22-2013 (07-22-2013, 01:56 AM)1llusion Wrote:(07-22-2013, 01:35 AM)The Alchemist Wrote: Why are interfaces recommended? Why not classes? Oops(no pun intended), I got confused with something else. RE: Introduction to class polymorphism - The Alchemist - 07-22-2013 (07-22-2013, 01:56 AM)1llusion Wrote:(07-22-2013, 01:35 AM)The Alchemist Wrote: Why are interfaces recommended? Why not classes? Oops(no pun intended), I got confused with something else. RE: Introduction to class polymorphism - Psycho_Coder - 07-22-2013 Very nice thread sir, looks clean and well explained. Great work , I see that you are getting a bit more active on HC again.
RE: Introduction to class polymorphism - Psycho_Coder - 07-22-2013 Very nice thread sir, looks clean and well explained. Great work , I see that you are getting a bit more active on HC again.
RE: Introduction to class polymorphism - Psycho_Coder - 07-22-2013 Very nice thread sir, looks clean and well explained. Great work , I see that you are getting a bit more active on HC again.
RE: Introduction to class polymorphism - Deque - 07-22-2013 Nice examples, that's what I would have done too. Show the bad alternatives first and go to the better code that uses polymorphism later. You explained class polymorphism now, but not polymorphism. Maybe you can add a little sentence about that. RE: Introduction to class polymorphism - Deque - 07-22-2013 Nice examples, that's what I would have done too. Show the bad alternatives first and go to the better code that uses polymorphism later. You explained class polymorphism now, but not polymorphism. Maybe you can add a little sentence about that. |