Re: Polymorphism sucks [Was: Paradigms which way to go?]



Thomas Gagne wrote:

> The intersection above is another rectangle so why return an
> intersection when I can return a rectangle?

Well, depending on the requirements, it might be simpler - for example, if
we need the intersection anyway, and don't care at all about wether an
intersection is a rectangle.

That's why I think that statements like "OO is good/bad for shapes" is
nonsense - you need to know what a system is supposed *to do* to decide
wether and how to use an implementation technique like OO. If the
application needs to decide wether all rectangles are green, we might
actually prefer Prolog... ;)

Cheers, Ilja


.



Relevant Pages

  • Re: Testing Intersection with A Rectangle(2D) w/No Area
    ... > How do I test a rectangle for intersection with another rectangle which has ... > false for a degenerate rect which is equivalent to a line. ... Boeing Associate Technical Fellow ...
    (comp.lang.java.gui)
  • Re: Intersecting Polygons
    ... I should have asked about the intersection of 2 POLYGONS, ... The polygons can have 3 or more points/sides, ... > Hi Matt: ... > places the coordinates of the intersection rectangle into the destination ...
    (microsoft.public.vb.general.discussion)
  • Re: Calculating the area of intersection of ellipse and a rectangle
    ... Calculating the area of intersection of an ellipse and a rectangle ... may I ask you if anybody knows about an efficient method or may be ...
    (comp.soft-sys.matlab)
  • Re: Intersecting Polygons
    ... don't use polygons much so I can't help you out there. ... I should have asked about the intersection of 2 POLYGONS, ... >> places the coordinates of the intersection rectangle into the destination ... >> Doug. ...
    (microsoft.public.vb.general.discussion)