receive should have a shorthand #74

Open
opened 2025-07-04 00:32:30 +00:00 by scott · 0 comments
Owner

receive should have a shorthand form, with a single clause on the right hand side.

So both of the following could work:

receive {
  :foo -> :bar
  :bar -> :baz
}

receive :foo -> :bar

That at least makes writing "synchronous" methods easier:

foo ::bar (self (), 42)
receive (:reply, msg) -> msg

This has the benefit of being extremely similar to function syntax.

`receive` should have a shorthand form, with a single clause on the right hand side. So both of the following could work: ``` receive { :foo -> :bar :bar -> :baz } receive :foo -> :bar ``` That at least makes writing "synchronous" methods easier: ``` foo ::bar (self (), 42) receive (:reply, msg) -> msg ``` This has the benefit of being _extremely_ similar to function syntax.
scott added the
feature
design
labels 2025-07-04 00:32:39 +00:00
scott added this to the Expanded: CC2 milestone 2025-07-04 00:32:42 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twc/ludus#74
No description provided.