[CCC DEV] Interfaces within "Plumbing"

Christian Jacobsen cljacobsen at gmail.com
Sat Jan 22 20:20:57 GMT 2011



On 22 Jan 2011, at 18:22, Matt Jadud <matt at jadud.com> wrote:

> On Sat, Jan 22, 2011 at 12:00, Steve Pretty
> <steve.g.pretty at btinternet.com> wrote:
>> I wonder if there is not a case for applying Occam's Razor here - eliminate
>> both these entities and use the standard BOOL throughout?
> I'll have to think about it. We wrestled quite a bit with it, and I
> agree: it is annoying at times. The SIGNAL is nice in places where you
> really do have a valueless signal:
> 
> CHAN SIGNAL s:
> ...
>  s ! SIGNAL
> ...

I think the more important pattern to show is the receiver side:

CHAN SIGNAL s:
...
s ? SIGNAL

If we use another type, such as a BOOL, we must read the value into a variable, even though we are not interested in the value:

CHAN BOOL b:
...
BOOL dummy:
b ? dummy

This is the pattern we are trying to avoid with the signal type... Perhaps it introduces other problems, as you mention, which we will have to look at. Or perhaps the use of SIGNAL is just not appropriate in plumbing. 

Christian


More information about the developers mailing list