|
|
On 8/14/2012 4:19, clipka wrote:
> That's quite a stupid thing to do, because you then can't tell at
> compile-time whether some other function expecting a parameter of type "Bar"
> actually gets passed such a type when using (in C++ style pseudocode):
I think the problem is more that Haskell is functional rather than OO, so
the stuff people do by having private classes in OO languages is stuff
Haskell does by having opaque types. So instead of
f.x()
accessing the private values inside f, in Haskell you write
x(f)
at which point you want to be able to pass around an "f" without being able
to look inside f.
So it's Andrew's category error, mapping the wrong concepts onto what he
already knows.
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
|