
17 Dec
2007
17 Dec
'07
5:30 p.m.
On Mon, 2007-12-17 at 22:12 +0300, Miguel Mitrofanov wrote:
There's a third way, too, and I haven't seen anybody mention it yet
I've noticed it, but there are some problems with this representation, so I decided not to mention it. It's OK as far as we don't want functions working on two areas - I don't see, how we can implement, say, intersect :: Shape -> Shape -> Bool in this way. However, it's a useful pattern.
And how do you do it in a "typical" OO language like Java or C# or Smalltalk?