From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Services can now have a default value Date: Sun, 23 Apr 2017 00:57:18 +0200 Message-ID: <87h91ggiep.fsf@gnu.org> References: <87shl9qo7h.fsf@gnu.org> <877f2go3wn.fsf@zancanaro.id.au> <877f2gksbs.fsf@gnu.org> <8737d32abz.fsf@zancanaro.id.au> <87bmrr4ghh.fsf@gnu.org> <874lxjnzyx.fsf@zancanaro.id.au> <87bmrp8lk6.fsf@gnu.org> <8760hw7b5q.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d23y0-0004jC-UD for guix-devel@gnu.org; Sat, 22 Apr 2017 18:57:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d23xx-0005qr-TH for guix-devel@gnu.org; Sat, 22 Apr 2017 18:57:25 -0400 In-Reply-To: <8760hw7b5q.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sat, 22 Apr 2017 09:46:25 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Allan Webber Cc: guix-devel , Carlo Zancanaro Christopher Allan Webber skribis: > Ludovic Court=C3=A8s writes: > >> Hello, >> >> Carlo Zancanaro skribis: >> >>> On Thu, Apr 20 2017, Ludovic Court=C3=A8s wrote: >>>> There must be some sort of a mapping between service types and >>>> configuration types, indeed, but I=E2=80=99m not sure how to achieve i= t. >>>> >>>> One solution would be to have all the records >>>> inherit (in the OO sense) from , or something along these >>>> lines. >>> >>> This was my first thought. I couldn't see how to do OO-style inheritance >>> with the SRFI-9 API, though. I'm not very experienced with Guile (or >>> scheme generally), so I might do some more reading about that. >> >> SRFI-99 supports inheritance, though there=E2=80=99s currently no SRFI-9= 9 module >> in Guile proper: >> >> https://srfi.schemers.org/srfi-99/srfi-99.html >> >> Oh and there=E2=80=99s also R6RS records, SRFI-35=E2=80=A6 no shortage o= f record APIs! >> :-) > > A record interface with inheritance! Neat. > > Though hey, if you're going to add inheritance, we also have GOOPS, and > with the clone macro I sent to the mailing list a while ago that I > worked on with Janneke, we even have immutable GOOPS! ;) > Plus then you get generic methods! Point taken! :-) I genuinely didn=E2=80=99t even think about GOOPS here ;-), but you=E2=80= =99re right. Ludo=E2=80=99.