On 29 Sep 1999, Marcin 'Qrczak' Kowalczyk wrote:

> Wed, 29 Sep 1999 11:43:06 +0200, George Russell <[EMAIL PROTECTED]> pisze:
> 
> > When that happens in my code it counts as a bug!  Therefore error
> > is appropriate.  If you are in some larger Haskell universe calling
> > component Haskell code it is unfortunate if a single error calls the
> > entire universe to collapse, so you do need some way of recovering,
> 
> I agree to both of the above.
> 
> I only don't like the details about IOError. It's not extensible
> and Dynamic is still not nice. I have no idea how to make it
> better. Probably some general way of making extensible datatypes.


        I think anyone involved in this and other related
        threads should really take a serious look at O'Haskell.
        Johann does not brag too much about it, so someone has to do
        it for him :-).

        I am one of those who support "small is beautiful"
        idea and therefore I do not particularly like extensions
        to existing systems - unless such extensions are deemed
        absolutely necessary for practical reasons, especially if they
        seem to fit well into the parent's base and do not look as ad hoc
        decorations but as well thought off concepts.

        Regardless of all sorts of constraints, Haskell has achieved
        a lot in its current form. Working with restrictions
        can be fun and intellectually stimulating but nevertheless
        it can be sometimes frustrating. It's like writing a book
        without using one of the letters of the alphabet, which
        can be really challenging if you choose not to use the
        most frequent vowel, as "e" in English. (*)

        O'Haskell seems to take a stance: "Let's admit that
        we need objects. Instead of peaking and poking here
        and there i/o-wise why don't we start from scratch
        and let them be as the first-class entities in Haskell?"

        But referential transparency still holds, even though
        the dreaded "x := x + 1" syntax is bravely exposed for
        state updating in objects.

        O'Haskell is able to extend hierarchies of entities via two
        orthogonal mechanisms:
        - subclassing, as in Haskell
        - subtyping

        This way one can easily generalize on existing abstractions.
        Building superclasses on a top of existing classes
        was a challenge for me in Smalltalk or Eiffel. Not
        in O'Haskell!

        Jan

        P.S.

        (*) This is called lipography. A lipogram is a piece of text
        written under the constraint that one or more letters
        are not allowed to be used at all. Two examples:
        - A e-less novel "Gatsby" by obscure Californian Ernest Vincent
          Wright, written in late 1930's.
        - An excentric novel "La disparition" by French writer
          Georges Perec, written in French (again without letter "e")
          in 1969. This is a 26-volumed book (corresponding
          to the fact that there are 26 letters of alphabet),
          with volume 5  missing.

        Source: Le Ton beau de Marot: In praise of the Music
        of Language, by Douglas R. Hofstadter, ISBN 0-465-08643-8,
        Basic Books, 1997




 




Reply via email to