As far as I can tell, we agree except on whether you have argued against any claim that I actually made. 1. On 2003-12-11T20:16:51-0500, FranklinChen@cmu.edu wrote: > The only reason I brought anything up at all was to address a very > specific point, i.e., the claim that printing could not be made > generic. I'm not sure what you mean here by "generic". In any case, I don't recall saying anything about printing in my original message that you first replied to. That message of mine said of C++: And you can custom-define a data type like data SuperList a = SuperList a (SuperList [a]) whose reading potentially involves all of this infinite family of list-reading functions. This infinity distinguishes Haskell type classes from, say, C++ templates. 2. > I disproved it in two different ways (one of which I > posted), though both could be considered "cheating". The message with "two different ways" that I think you are referring to replies to my noting that I cannot write operator << for a certain definition of SuperList that you posted. Neither of your two ways includes operator << for that definition of SuperList. I don't recall making any claim that printing cannot be made generic. 3. > The code I posted doesn't do this stuff, of course. It's the code I > didn't post, but compiles and runs fine, which does the following: > - SuperList<T> for all SuperLists of different depths (and therefore > storable in a homogeneous container) > - ostream output > - equality comparison In my previous message, I posted some code in Haskell and some transcripts of its behavior, then claimed that C++ (templates) cannot achieve that effect in a way that -extends- to equality comparisons and storage in homogeneous containers. The code you just posted does not achieve the same effect as my Haskell code; it does not take as runtime input the depth of the SuperList. So again, I don't see that we actually disagree: you posted some code showing that C++ (templates) can do certain things, in response to my claiming that C++ (templates) cannot do certain other things. Ken -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig Remember 9/11 * "It's untidy. And freedom's untidy. And free people are free to make mistakes and commit crimes and do bad things." -- Donald Rumsfeld
Attachment:
signature.asc
Description: Digital signature