RE: Beginner Tutorials for using CLASSES in PHP4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-10-11 at 07:19 -0500, Jay Blanchard wrote:
> [snip]
> What I was really illustrating is how interfaces are syntactic
> sugar only. In my above example what I've really shown is an
> implicit interface :) Since OOP is largely meant to model real
> world things, ask yourself this... when a doctor sews a pig's
> heart into a human, do you think there's an explicit interface
> someplace that checks for compatibility, or does it "just work"
> if the conditions are right. Food for thought, pork in fact ;)
> [/snip]
> 
> No doubt they are syntactic sugar (and not needed for polymorphism), PHP
> and other languages are sprinkled with such spices. And just like spices
> these things have a proper place and usage. (Unless I am slow cooking my
> world famous brown sugar and cinnamon brisket.) Given the class brisket
> that extends meat I would likely use an interface to implement said
> world famous brisket just as others might implement an interface for
> their brisket. Of course my recipe could be a child of brisket, but may
> violate the IS_A relationship unless a recipe is implicitly implied for
> each brisket. Sometimes this syntactic sugar makes for cleaner code
> (especially when others who are not aware, sometimes folks do it just to
> do it. YMMV and I am now hungry.
> 
> BTW, pigs hearts and other body parts are used extensively in research
> where human physiology is concerned because of their similarity.

And how do you think "similarity" was determined? Most likely by trying
options until something worked :)

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux