Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msg Shard should only take String rvalues and is not intended for variables, including argument values #674

Open
Yttruire opened this issue May 12, 2023 · 0 comments

Comments

@Yttruire
Copy link
Contributor

Yttruire commented May 12, 2023

Describe the bug

The Msg shard currently displays the values of variables, and parameters. By design, this is not intentional, and should only print String messages that have been input directly as-is. Use Log for printing variable values to console. The error message output should also be updated accordingly to be more specific than a type mismatch (See #673).

To Reproduce

The following code example is from the current (12/5/23) Shards documentation. This code runs and prints the values of the arguments. This is not intentional by design.

(defshards msgshard [a b]
  (Msg a)  ;; print value of 1st arg passed
  (Msg b)) ;; print value of 2nd arg passed

(Msg "Hello World") ;; prints string
(msgshard "Bye" "Universe") ;; prints args passed

Expected behavior

An error should occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant