h3rald / min

A small but practical concatenative programming language and shell
https://min-lang.org
MIT License
311 stars 23 forks source link

Code In Commenting #86

Closed ghost closed 3 years ago

ghost commented 3 years ago

You are going to add #| ... |#. Now, i think there should be one more begin-end commentation like Q| ... |Q. If you do that then i will be able to introduce it to Notepad++ Min Extension.

What it brings to us?

I can except Q| ... |Q from commenting style. Thereafter:

#| ... |# => Comment Style Q| ... |Q => Code Style(No-Comment Style)

This will enable to documentate code examples within multi-line comments.

You should make another string declaration like as backticks (``).

I will except it from string-styling if you add it.

h3rald commented 3 years ago

Uhm... not sure I like Q| ... |Q for... documentation comments, is that what you mean?

I wanted to make it similar to lisp/scheme comments (hence ; are used for single line comments) but multi-line comments are rare in lisp/scheme, and for documentation they seem to use multiple ;, which is not great.

Maybe #|| ... ||# instead?

And why would you add backticks exactly? What would they be used for? Can you write an example?

documentation comments imply a documentation generator.... 😱 that's a whole project by itself.

ghost commented 3 years ago

No no. I cannot explain it in Github because of non-hightlighting of Github for Min.

ghost commented 3 years ago

documentation comments imply a documentation generator.... 😱 that's a whole project by itself.

There are things which chained to each other.

Code Examples without Comment Highlighting In Comments

Code Documentation for Symbol Usage
ghost commented 3 years ago

#|| ... ||#

Okay, good! 👍

h3rald commented 3 years ago

No no. I cannot explain it in Github because of non-hightlighting of Github for Min.

; Scheme highlighting half works for min ;)
"Test" :test
(1 2 3 4) 'puts foreach

...but unfortunately not even GitHub highlighters for lisp or scheme recognize #| ... |# for block comments 😞 because they don't seem to be that popular.

ghost commented 3 years ago

No no. I cannot explain it in Github because of non-hightlighting of Github for Min.

; Scheme highlighting half works for min ;)
"Test" :test
(1 2 3 4) 'puts foreach

...but unfortunately not even GitHub highlighters for lisp or scheme recognize #| ... |# for block comments 😞 because they don't seem to be that popular.

Yeah, there are some extensions who i know and that is made: VSCod Min Hghl. Vim Min Hghl. Sublime Text Min Hghl. Notepad++ Min Hghl.. this is what we can do. 🤒

Brr. Cold is everywhere and Github too. No highlighting isn't a problem for don't preffering Github, methinks. 😄

A look at: https://github.com/github/linguist