I'm just a very newcomer to nim, and very poor in English. So please forgive my funny mistake i will have had, thanks.
Now, let's talk about the comments. As i know so far, nim do not have multi-line comments but sigle-line's. But how can i easily comment a long block may over than 100 lines? In lua:
-- Single-line comment
--[==[
Multi-line comments. If we use same counts of '=' inside "[[" and "]]", we have a matched comments
That means comments can be nested. Another advantage about this is as follows.
--]==]
---[==[ If we add a '-' ahead of this line, the codes commented above released except this line and the last.
(Not commented codes)
--]==] This line also commented
IMO(picked up a while ago 0.0), multi-line comments may be some better valuable feature for convenience.
Strings. In fact, i do not know why langs i learned before be different between single-line('\n' is ignored) and multi-line strings.
"" # single-line string
""" # multi-line and raw string
"""
r"" # single-line and raw string
r""" # multi-line and raw string
"""
Well and IMO, these may lead a few traps:
r"""" # 0.0 this is not single-line raw string `"`
r"""
I want write here some symbols like """. # string ends here
""" # not here
r""" 1: one""
"" 2: one""
"" 3: one""" # and see bellow
identifier""" 1: one""
"" 2: one""
"" 3: one""" # 0.0
At last, all my suggestion is:
# document comments ignored
# single-line comment
#-- multi-line comments
#--
#!-- release multi-line comments
#--
"
\"only multi-line string, and tab, new line, etc will be kept.\"
"
r"--
raw string, '-' could be arbitrary amounts (includes 0), "" means `""` not `"`
--"
Thanks for enduring my poor English. And these all IMO. 0.0discard """ arbitrary text here and more stuff """
make it it mostly a non-issue.
Most IDEs usually give you the ability to write C, C++ or Java, So you may call whole Nim language a non-issue :-)
works today:
#[ comment ]#