-
Notifications
You must be signed in to change notification settings - Fork 430
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
"//" as comments ? #80
Comments
Many people really love these. I wonder how we might represent them. In the simplest case, you could imagine merely formatting any comment that contains no newline as a line comment. (* this comment*) would become: // this comment The only downside is that when you parse in Reason: /* This Comment */ It would be printed as a line comment. There would also be an extra check to make sure you're not already inside of a comment (nested). I don't have any strong opinion in support/opposition to line comments. However, I like that it makes the technology more familiar to people. |
This discussion points to a consequence of Reason's design that I had not thought about much. |
Another example: (((3 + 2))) |
It seems people really want this. @yunxing, seems like a good first issue for contributors. |
Yes, I was thinking about this as well (and I also really want this). I haven't found a good solution except for Cristiano's idea. But maybe It seems people really want this. @yunxing https://github.com/yunxing, — |
I think it's just as easy to add it to both parsing and printing. Shouldn't it just be as easy as printing comments with no newlines as
|
The only challenge here is making sure that the operator |
Any update on this. In my brief experience using reason, this is by far the most frustrating limitation of the syntax. |
No update yet. We can probably just print any comment as a single line comment automatically that:
|
I believe this can be closed due to the merging of #2254 |
Indeed, this is implemented and released |
Currently we only support "/*" as comment.
Should we also support the format of "//" ?
The text was updated successfully, but these errors were encountered: