From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Services can now have a default value Date: Sat, 22 Apr 2017 09:46:25 -0500 Message-ID: <8760hw7b5q.fsf@dustycloud.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> 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]:57206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1wIy-00011t-BK for guix-devel@gnu.org; Sat, 22 Apr 2017 10:46:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1wIv-0003aJ-6U for guix-devel@gnu.org; Sat, 22 Apr 2017 10:46:32 -0400 In-reply-to: <87bmrp8lk6.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel , Carlo Zancanaro 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 = it. >>> >>> 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 inheritan= ce >> 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-= 99 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 = of 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! - Chris Webber, who may only be slightly trolling and knows Guix will probably never adopt using GOOPS