In the current design of Msglang, the receive expression fails if the cardinality of the received message
Question:
In the current design of Msglang, the receive expression fails if the cardinality of the received message doesn’t match with the expected cardinality of the sent message. That might seem overly restrictive to some. If the sender sends more values then the receiver needs, known as wider messages, then another design might discard the extra values that are received and proceed to evaluate the body of the receive expression. In other words, receiving few values might surprise the receiver, but receiving more values might not, although it does have a “smell.” Design and implement a variation of Msglang in which receive expressions accept and process wider messages, and illustrate your variation using examples.
Step by Step Answer:
An Experiential Introduction To Principles Of Programming Languages
ISBN: 9780262045452
1st Edition
Authors: Hridesh Rajan