Comments

Comments start with the # character. All following content up to the end of the line is part of the comment. Comments may be on their own line or follow after a Crystal expression (trailing comment).

# This is a comment
puts "hello" # This is a trailing comment

The purpose of comments is documenting the code. Public documentation, including autogenerated API docs, is a special feature based on comments and is described in Documenting Code.

To the extent possible under law, the persons who contributed to this workhave waived
all copyright and related or neighboring rights to this workby associating CC0 with it.
https://crystal-lang.org/reference/syntax_and_semantics/comments.html