Skip to content

Language change to allow bindings interleaved with actions with every compound action #528

Open
@b1conrad

Description

@b1conrad

Actions and defactions can return a result, which can be bound to a name with a setting clause. Often the result isn't directly useful to subsequent actions in the sequence (in an every compound action).

For one example, the ctx:newChannel built-in action returns the entire channel map

  ctx:newChannel(tags,eventPolicy,queryPolicy) setting(channel)

but what we'll need in subsequent actions will most likely be just the channel ID (aka ECI)

  ctx:delChannel(channel{"id"})

so it would be useful notation to be able to place bindings between actions, like so:

every {
  ctx:newChannel(tags,eventPolicy,queryPolicy) setting(channel)
  eci = channel{"id"}
  ... // including uses of eci
   ctx:delChannel(eci)
}

This makes coding clearer and eliminates repetitions of the sub-expression because it can be bound to a name.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions