The progress of the inheritance of record-type in r7rs-large?

67 views
Skip to first unread message

Nala Ginrut

unread,
Apr 29, 2019, 3:12:56 PM4/29/19
to scheme-reports-wg2
I've read the previous posts about the inheritance of record-type in r7rs-large.
All the posts are in 2016. I'd like to ask if there's any decision or discussion in 2019?
Thanks!

Best regards.

Marc Nieper-Wißkirchen

unread,
Apr 29, 2019, 4:44:08 PM4/29/19
to scheme-reports-wg2
The latest contribution to inheritence of record types is my SRFI 150, which was finalized in 2018.

After 2016, there was no further discussion or attempt to reach consensus.

Some proposals cannot be implemented portably in R7RS-small (because they need unhygienic macros), so it somehow makes sense to revisit inheritance of record types not before agreeing on extensions to syntax-rules in R7RS-large, which may itself be quite some time in the future.

-- Marc

John Cowan

unread,
Apr 30, 2019, 4:42:40 PM4/30/19
to scheme-re...@googlegroups.com
In my opinion, the time has come to take the dictum "favor composition over inheritance" seriously, and not attempt to standardize inheritance, multiple or single for Scheme.  The good part of OO is generic functions, and there is a proposal to include those (using predicates rather than classes) in R7RS-small.  Googling "inheritance considered harmful|evil" will find a whole lot of explanations for what's wrong with implementation inheritance.

Inheritance began in Lisp, like many things.  Let's let it end here, too.


John Cowan          http://vrici.lojban.org/~cowan        co...@ccil.org
The penguin geeks is happy / As under the waves they lark
The closed-source geeks ain't happy / They sad cause they in the dark
But geeks in the dark is lucky / They in for a worser treat
One day when the Borg go belly-up / Guess who wind up on the street.


--
You received this message because you are subscribed to the Google Groups "scheme-reports-wg2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scheme-reports-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arthur A. Gleckler

unread,
May 3, 2019, 10:45:16 AM5/3/19
to scheme-re...@googlegroups.com
On Tue, Apr 30, 2019 at 4:42 PM John Cowan <co...@ccil.org> wrote:
In my opinion, the time has come to take the dictum "favor composition over inheritance" seriously, and not attempt to standardize inheritance, multiple or single for Scheme.  The good part of OO is generic functions, and there is a proposal to include those (using predicates rather than classes) in R7RS-small.  Googling "inheritance considered harmful|evil" will find a whole lot of explanations for what's wrong with implementation inheritance.

I disagree.  I don't want object-oriented inheritance, either, but simple data structure inheritance can be useful by itself, without the drawbacks of full OO inheritance.  For example, in my implementation of hash array-mapped tries, used in SRFI 146, there are two record types that are structurally identical, i.e. that have the same fields, but that are used in different ways.  It would be have made the code cleaner to have had them inherit their structure from a common type but still behave differently based on their subtypes.  Composition would have been more verbose and would also have required an extra level of indirection and the associated cache misses in inner loops.

Marc Nieper-Wißkirchen

unread,
May 3, 2019, 10:57:21 AM5/3/19
to scheme-re...@googlegroups.com
Am Fr., 3. Mai 2019 um 16:45 Uhr schrieb Arthur A. Gleckler
<sch...@speechcode.com>:
>
> On Tue, Apr 30, 2019 at 4:42 PM John Cowan <co...@ccil.org> wrote:
>>
>> In my opinion, the time has come to take the dictum "favor composition over inheritance" seriously, and not attempt to standardize inheritance, multiple or single for Scheme. The good part of OO is generic functions, and there is a proposal to include those (using predicates rather than classes) in R7RS-small. Googling "inheritance considered harmful|evil" will find a whole lot of explanations for what's wrong with implementation inheritance.
>
>
> I disagree. I don't want object-oriented inheritance, either, but simple data structure inheritance can be useful by itself, without the drawbacks of full OO inheritance. For example, in my implementation of hash array-mapped tries, used in SRFI 146, there are two record types that are structurally identical, i.e. that have the same fields, but that are used in different ways. It would be have made the code cleaner to have had them inherit their structure from a common type but still behave differently based on their subtypes. Composition would have been more verbose and would also have required an extra level of indirection and the associated cache misses in inner loops.

I agree with Arthur that data structure inheritance is important for
implementation purposes, which are orthogonal to large scale
inheritance trees for abstract and concrete data types as found in
other languages.

-- Marc

Nala Ginrut

unread,
May 8, 2019, 1:20:58 PM5/8/19
to scheme-reports-wg2
I disagree with the opinion to abandon inheritance.
And I agree with Arthur that inheritance is important.
The purpose of the standard should be more pragmatism. 
We can end many features to show extreme progress of Scheme, but it doesn't make any sense to help Scheme to be a usable language.
The standardization has to be compromised for many existing issues, if it doesn't meet this point, then fewer people use it, and it'll be the virtual standardization.
Reply all
Reply to author
Forward
0 new messages