[Haskell-cafe] Subclass or no subclass?

Darren Grant dedgrant at gmail.com
Mon Jul 1 18:21:31 CEST 2013

Here's another thought (not my own):

Abstractions can be classified based on where responsibility lies. Popular
languages implementing interface composition expect the caller to know
almost nothing about the concrete details while the callee has to handle
all concrete permutations. Conversely, the sort of abstraction we see in
typeclasses, much like those in c++ template programming, require the
client to dictate concrete details that satisfy the callee requirements.

On 2013-07-01 9:08 AM, "Patrick Browne" <patrick.browne at dit.ie> wrote:

> On 30/06/13, *Dan Burton * <danburton.email at gmail.com> wrote:
> I am not trying to say "every building is a shelter", rather "anything
>> that is a building must provide sheltering services".
> Well if it walks like a shelter and quacks like a shelter... /shrug
> One of the nice things about OO is the intuitive nature of the is-a
> relation between class and instance (forgetting hierarchies for the
> moment). I suggest that an intuitive interpretation of the  Haskell
> class–instance relation might be *acts-as*. For example, a car or a bus
> could afford transport once they have a move operation. This is an
> intuitive view for design; it does not reflect the language level function
> of handling ad-hoc polymorphism. Also it reifies the type class, which
> AFAIK does not exist at run time.
> Tá an teachtaireacht seo scanta ó thaobh ábhar agus víreas ag Seirbhís
> Scanta Ríomhphost de chuid Seirbhísí Faisnéise, ITBÁC agus meastar í a
> bheith slán. http://www.dit.ie
> This message has been scanned for content and viruses by the DIT
> Information Services E-Mail Scanning Service, and is believed to be clean.
> http://www.dit.ie
> _______________________________________________
> 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/20130701/8ffa1e19/attachment.htm>

More information about the Haskell-Cafe mailing list