Skip to content

Commit 9e82da4

Browse files
authored
Add some info about Unix style convention in IO (#13724)
1 parent d3b8dcd commit 9e82da4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/elixir/lib/io.ex

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ defmodule IO do
1212
(as shown in typespecs). For more information on chardata, see the
1313
"IO data" section below.
1414
15+
The functions of this module use UNIX-style naming where possible.
16+
1517
## IO devices
1618
1719
An IO device may be an atom or a PID. In case it is an atom,
@@ -294,6 +296,8 @@ defmodule IO do
294296
By default, the `device` is the standard output. It returns `:ok`
295297
if it succeeds.
296298
299+
Trivia: `puts` is shorthand for `put string`.
300+
297301
## Examples
298302
299303
IO.puts("Hello World!")
@@ -569,6 +573,8 @@ defmodule IO do
569573
for instance, `{:error, :estale}` if reading from an
570574
NFS volume
571575
576+
Trivia: `gets` is shorthand for `get string`.
577+
572578
## Examples
573579
574580
To display "What is your name?" as a prompt and await user input:

0 commit comments

Comments
 (0)