Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion defrecord with "inheritance"
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Nolen  
View profile  
 More options May 21 2012, 10:08 am
From: David Nolen <dnolen.li...@gmail.com>
Date: Mon, 21 May 2012 10:08:52 -0400
Local: Mon, May 21 2012 10:08 am
Subject: Re: defrecord with "inheritance"

On Mon, May 21, 2012 at 5:39 AM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> On Mon, May 21, 2012 at 1:53 AM, nicolas.o...@gmail.com <
> nicolas.o...@gmail.com> wrote:

>> I just have. This is a nice work. There is a lot of repetitions though.

> Thanks Nicolas for putting together these examples.  This is exactly what
> I've been talking about.  Whenever someone talks about the issue of
> developing reusable partial implementation of protocols, the answer is
> always, "You can do that easily in Clojure by merging mappings."  But in
> practice, I haven't seen many examples of anyone actually doing that.  If
> people who are writing big systems (e.g., Clojurescript) aren't actually
> providing mergeable mappings, then writing new implementations for these
> protocols becomes a big copy-paste hackjob.

Have you looked at systems that use protocols extensively? The two I'm
familiar with, core.logic and ClojureScript, do not constitute a
"copy-paste hackjob". In fact I'd be surprised if the amount of copy-paste
in either isn't less than 1% of the entire code base and a 1% where the
redundancy is innocuous (IHash, IPrintable).

> We need to figure out a way to make reusable partial implementations the
> norm.

Shared functions work today.

None of this to suggest that there aren't more "convenient" ways to share
defaults. But I think the benefit of having type definitions that can be
understood with an entirely local reading without having to search a type
hierarchy or consider "defaults" should not be underestimated.

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.