Skip to content

Commit 9214d89

Browse files
committed
Add note about say vs. put in docs.
Closes #1441
1 parent dd83864 commit 9214d89

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

STYLEGUIDE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ so it's best to use it from the start.
3131

3232
### Language
3333

34+
##### 'say' vs 'put'
35+
36+
While there is no hard and fast rule about which of these routines to use
37+
in a given situation, please try to follow these guidelines.
38+
39+
When generating output in examples intended to be read by a user, use 'say'.
40+
Additionally, add a comment showing the intended output, e.g.:
41+
42+
say 3.^name; #OUTPUT: «Int␤»
43+
44+
For examples where a particular format is required, or exact data is expected
45+
(e.g. for something sent over a network connection), prefer 'put'.
46+
3447
##### 'parameter' vs 'argument'
3548

3649
* Argument: what it looks like to the caller

0 commit comments

Comments
 (0)