Hello, is there any web resource which describes the problems with Haskell 98's record system in a compact form? The Curry people are about to adopt (parts of) this module system and I warned them that many consider it flawed. Alas, I'm not an expert in this area, so I cannot give much good arguments in this respect. Therefore, I would be happy if someone could point me to a resource describing the problems or even telling the Curry people about the problems on the Curry Mailing List [1]. Best wishes, Wolfgang [1] http://www.informatik.uni-kiel.de/~curry/mailinglist.html
Hello, Do you mean the record system or the module system? I don't think either is exactly flawed, but for both, people have wanted them to do more (and some have suggested that they should be the same thing :-) The main problem with the record system I have heard about is that people want to be able to reuse the labels in mutiple types (and perhaps to have records that do not need to be declared, e.g., like tuples). The main problem I find with the module system is that it is difficult to export nearly everything from a module. Other complaints I have heard about, is that there are no signatures (in ML style), so it is hard to use the module system to define APIs. -Iavor On 2/17/06, Wolfgang Jeltsch <wolfgang@jeltsch.net> wrote:
Hello,
is there any web resource which describes the problems with Haskell 98's record system in a compact form? The Curry people are about to adopt (parts of) this module system and I warned them that many consider it flawed. Alas, I'm not an expert in this area, so I cannot give much good arguments in this respect. Therefore, I would be happy if someone could point me to a resource describing the problems or even telling the Curry people about the problems on the Curry Mailing List [1].
Best wishes, Wolfgang
[1] http://www.informatik.uni-kiel.de/~curry/mailinglist.html _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
On 17/02/06, Iavor Diatchki <iavor.diatchki@gmail.com> wrote:
The main problem I find with the module system is that it is difficult to export nearly everything from a module.
Just to clarify this, he means that in the sense that exporting all but a few of the symbols from a module is difficult, not in the sense that each thing is individually hard to export. :) The problem is that unless you export everything, you are forced to list all exports explicitly, so there's no way to tell it just the few things you're hiding (though that should not be a difficult extension). - Cale
Cale Gibbard wrote:
... unless you export everything, you are forced to list all exports explicitly, so there's no way to tell it just the few things you're hiding (though that should not be a difficult extension).
Alternative suggestion: remove export lists, introduce public/private modifiers http://www.haskell.org//pipermail/haskell-prime/2006-January/000230.html -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- ---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
Hello, On 2/19/06, Johannes Waldmann <waldmann@imn.htwk-leipzig.de> wrote:
... unless you export everything, you are forced to list all exports explicitly, so there's no way to tell it just the few things you're hiding (though that should not be a difficult extension).
Alternative suggestion: remove export lists, introduce public/private modifiers http://www.haskell.org//pipermail/haskell-prime/2006-January/000230.html
Yeah, I have also thought about this option, and I think it is a good idea. It makes it a lot easier to deal with recursive modules, because there is no need to do any fix-point computations, as it is clear from the program text exactly what is exported from each module. And it nicely deals with re-exporting imported entities: public imports get reexported, private ones don't. -Iavor
Iavor Diatchki wrote:
remove export lists, introduce public/private modifiers
And it nicely deals with re-exporting imported entities: public imports get reexported, private ones don't.
note though that the public/private thing in Java also refers to the "package" concept, which is missing from Haskell (this is worked around at the language level by re-exporting modules, and at the tool level by Cabal - both kludgy, methinks). -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- ---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
participants (4)
-
Cale Gibbard -
Iavor Diatchki -
Johannes Waldmann -
Wolfgang Jeltsch