[Haskell-cafe] Object oriented haskell.

Darren Grant dedgrant at gmail.com
Thu May 15 23:35:20 UTC 2014


Magnus, did you notice the Alan Kay quote that was generated for your sig?
Serendipitous. :-)

Haskell subsumes a great deal of semantics from many programming models.
This is not to say that it is necessarily a productive end-tool
replacement, but many have discovered that it is a great language to build
such tools with.

Cheers,
Darren
On May 15, 2014 4:00 PM, "Magnus Therning" <magnus at therning.org> wrote:

> On Fri, May 16, 2014 at 12:47:40AM +0200, silvio wrote:
> >> Firstly, a notation where you put the first argument before the
> >> function/method?
> >>
> >>   [1,2,3] . length -> 3
> >>
> >> Secondly, mimic the multilayered namespaces that is commonly found
> >> in mainstream imperative OO languages?
> >>
> >>   [1,2,3] . length -> 3::Int
> >>   aPieceOfString . length -> 120.0::Double
> >>
> >> Just trying to understand what problem you are actually trying to
> >> solve.  I've *never* thought of (.) being powerful in OO languages,
> >> mostly because I don't really think the dot is what makes an OO
> >> language.
> >
> > That's essentially it. I see that people on this thread where
> > thinking more along the lines of inheritance. So let me add that it
> > shouldn't be difficult to add the instances you want for your child
> > object and then make a default instance which reverts to the parent
> > object. It's a bit of a problem for updating stuff in a functional
> > way since you can never be sure if a method is ment to return an
> > object or if this is supposed to be an update. But for things in
> > IO/STM/... it should be fine.
>
> Excellent, then at least understand what you are after.  I was
> confused by the ensuing discussion, because it so quickly moved away
> from what I thought you were really proposing.
>
> To be honest I've more often missed Haskell's (.) when programming in
> C/C++/C# than the other way around ;)
>
> /M
>
> --
> Magnus Therning                      OpenPGP: 0xAB4DFBA4
> email: magnus at therning.org   jabber: magnus at therning.org
> twitter: magthe               http://therning.org/magnus
>
> I invented the term Object-Oriented, and I can tell you I did not have
> C++ in mind.
>      -- Alan Kay
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140516/03ed68ca/attachment.html>


More information about the Haskell-Cafe mailing list