guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Services can now have a default value


From: Christopher Allan Webber
Subject: Re: Services can now have a default value
Date: Sat, 22 Apr 2017 09:46:25 -0500
User-agent: mu4e 0.9.18; emacs 25.1.1

Ludovic Courtès writes:

> Hello,
>
> Carlo Zancanaro <address@hidden> skribis:
>
>> On Thu, Apr 20 2017, Ludovic Courtès wrote:
>>> There must be some sort of a mapping between service types and
>>> configuration types, indeed, but I’m not sure how to achieve it.
>>>
>>> One solution would be to have all the <foo-configuration> records
>>> inherit (in the OO sense) from <service>, 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’s currently no SRFI-99 module
> in Guile proper:
>
>   https://srfi.schemers.org/srfi-99/srfi-99.html
>
> Oh and there’s also R6RS records, SRFI-35… 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]