chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH 0/5][5] Generalize port directionality and


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH 0/5][5] Generalize port directionality and add basic refinement types
Date: Sat, 9 Jul 2016 16:18:41 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Jun 30, 2016 at 08:09:44PM +1200, Evan Hanson wrote:
> Hi hackers,
> 
> Here is a quite large patchset that, at its heart, adds support for
> multidirectional ports by converting the simple boolean flag indicating
> whether a port is for input or output to a bitmap.

This was great work, once again, Evan!  Many thanks.  I've now pushed
these.

Regarding our earlier discussion, I think it's a good idea to now change
all procedures which return both an input and an output port to return a
bidirectional port instead.  This makes it less of a hassle to get these
values; you wouldn't need receive, call-with-values or let-values anymore.

For situations when it's desirable to expose only one end of a pair, we
could create a procedure like "extract-input-port" and "extract-output-port"
from a bidirectional port.  I'm not sure what good names would be for these.

> Specifically, there is now a "(refine (ATTRIBUTE ...) TYPE)" type form
> that tags a type with some extra information. For example, the type of
> an input port is now "(refine (input) port)" (although the "input-port"
> name has been left as an alias)

There are still some places in types.db where the old alias is used.
Shouldn't these be changed for consistency?

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

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