Closed dasch closed 8 years ago
Note that the {-
and -}
has the potential for nesting, which your proposal has not.
Say you have some big chunk of code, including comments, in your file:
...
{-
some comment
-}
some code
...
more stuff like above
...
Now, for some reason during development, you want to temporarily outcomment that whole chunk (several functions) in your file. You can do that by surrounding the whole chunk as follows:
{-
...
{-
some comment
-}
some code
...
more stuff like above
...
-}
Now think about what would happen if you tried the same with ---
as both start and end markers of comments. :smile:
I've just never had that problem in all my years of doing Ruby development :-/ is this really something that people do?
Ruby's multi-line comment syntax is basically unused, much less any nesting... I agree, it's nice to have the capability to nest comments.
@dasch, about whether or not people do/want that (maybe in some languages, but not in others): search the internet for "nested comments" (probably you don't even need to add "programming"), then prepare for a long afternoon of reading pro and cons discussions.
Yeah, guess this is a no-go then, especially since the current syntax is already there :-/ it just feels like there's so much... syntax. Well, closing this.
FWIW, Elm 0.16 will actually have less syntax than 0.15.
The current comment syntax is sort of baffling for me:
Especially the "documentation" syntax seems weird:
I know this is entirely subjecting, and feel free to close this if you think it's stupid, but I think this would be much, much nicer:
Basically, using a "horizontal line" to separate the comment from its surroundings. Since two dashes are already used for line-level comments, this is a much less alien syntax. I'd suggesting either doing away with the special syntax for doc comments or using four dashes to mark those.