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: Christian Kellermann
Subject: Re: [Chicken-hackers] [PATCH 0/5][5] Generalize port directionality and add basic refinement types
Date: Mon, 11 Jul 2016 10:00:14 +0200
User-agent: Mutt/1.5.24 (2015-08-30)

* John Cowan <address@hidden> [160709 19:03]:
> > 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.
>
> I'm not sure that these are in the spirit of Scheme's duck typing.
> In general we rely on programmer restraint to prevent, e.g., mutation
> of lists or strings when the rest of the program doesn't expect it.

I can see applications where this would be desireable though.

I think the existing make-input-port and make-output-port could be
changed to also accept an existing port and return a unidirectional
port if needed.

Better than introducing yet another name imho.

Kind regards,

Christian

--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.



reply via email to

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