Removing '@' ?

We have the problem in the block expression that @1 is the output port
and $1 is the input.  Everywhere else, we use variables for outputs
(i.e., the right hand side of an append) and then to refer to their
use as inputs.

Keep in mind that inputs are always references to some outputs - even
the ones declared as inputs to the overall flow.  We still have the
confusing bits that inputs to the pipeline are readable outputs within
the flow.

Meanwhile, if we could name the inputs, the collision between $1 on
the right hand side within a block expression would be removed.
Syntax aside, we could just require block expressions to name the
inputs:

$in → [source]
          { if ($source/doc/cheese='cheddar')
            then consume() ≫ $1
            else reject() ≫ $1 }
       ≫ $out

that would allow anonymous outputs as ordinals.

$in → [source]
          { if ($source/doc/cheese='cheddar')
            then consume() ≫ $1
            else reject() ≫ $1 }
       ≫ $out

Please keep in mind that I'm working more on the conceptual level and
the syntax is something we'll need to decide later.  So, the issues
are:

1. Do we have ordinal inputs and outputs?

2. Do we require users to name inputs to block expressions?  Is there
a default name if they don't?

3. Do we require users to name outputs at all?


So, we could say names default:

$in → { if ($source/doc/cheese='cheddar')
            then consume() ≫ $result
            else reject() ≫ $result }
       ≫ $out

-- 
--Alex Miłowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Friday, 12 February 2016 15:10:28 UTC