-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line comments delimiter #37
Comments
I came up with |
I really like ;; that was proposed in the linked thread (well i guess they proposed 3 semicolons), signature FOO = sig I guess the issue is that the following is effectively allowed by existing compilers?
|
Semicolon is a declaration separator in SML, and for better or worse, declarations can be empty. So |
@rossberg Thank you, I see it now, it took me quite a bit of staring before I noticed the empty declaration comment in figure 4/page 25, perhaps an empty optional <> on the left hand side would make it stand out more. |
Another argument against changing is that MLton and SML/NJ already implement the "(*)" syntax (not enabled by default though). |
Following the recent ideas in (ocaml pull-request discussion)[https://github.com/ocaml/ocaml/pull/671], I would like to propose another symbol for line comments -
|*
, since(*)
conflicts with typical documentation generation tool likeocamldoc
/haddock
/doxygen
.Pro:
|*
is easy to extend forsmldoc
-|**
.(* comment *)
; the opening symbol|
does not have a pair like[
or(
; blocks of comments are naturally separated by vertical line from code:(* *)
when commenting parts of the code. You need to add just one symbol to the right of pattern-matching or sum type declaration:Contra:
(*)
is already in proposal.|*
is relatively hard to type compared to--
,//
or other common symbols.The text was updated successfully, but these errors were encountered: