Closed BookOwl closed 7 years ago
/* C style */
{ Pascal style }
# Python-ish style #
<| Something I made up |>
{| Something else I made up |}
<- HTML-ish ->
(| Bananas |)
(: Emojis :)
? Question marks
and ??? Multiline ???
@liam4 @nanalan @jonathan50 @TheMonsterFromTheDeep @algmwc5 please tell me which one you guys think is best (and be serious please)
I am not one of the people listed, but oh well. I'll rank them in order, so my favourite will be at the top, and the one I dislike most will be 8th
5 just seems to be vertically misaligned and thus displeasing to the eye.
I would prefer C style comments as they're used in a good amount of languages and sometimes pseudocode. Line comments (in the form of //
) would be nice too instead of only multiline.
I like both C-style and Python-ish style. I'm honestly actually not sure which one I like better - although I think whichever one you choose should support block comments.
I like many of the brackets where the opening and closing character is different. Oh, and an interesting feature I would suggest is allow you to escape comment endings. Not sure how useful this would be, but a
< My comment \> continues till here> and then stops
might be cool, not sure though.
I don't like the Python-ish one much because hashtags have a rightward slant that makes my brain think of it as an opening "bracket". If there was a hashtag in ASCII that slants in the opposite direction I'd say that could be a pretty cool comment system.
@joker314, I just didn't know your Github account.
Right now I'm deciding between 1 and 6. Thanks for the input guys! :D
I personally don't really find angle brackets to be that attractive for commenting. However, that may simply be because I'm so used to other symbols for it... :package:
I think however that the best choice for this language is something that clearly marks said comment as descriptive, and I honestly have no idea what the best syntax to do that might be. I think something with quotation marks might work, like <" comment >
because that sort of marks it as a note, but then there is the confusion between that and string syntax...
The other symbol I think might work with commenting is the question mark, so maybe something like <? comment >
would be good. I like the question mark in comments because it sort of looks distinct from code and it also sort of conveys the notion that it's there to help.
I also agree with io that inline comments would be nice too - I think question marks would also work well for that, e.g.
? This method calculates the factorial of parameter n.
? This is not the most efficient way to do it, but it works for demonstration purposes.
to factorial with (n) do ...
Hmmm. I like 2-5.
@TheMonsterFromTheDeep Then you can't name procedures or variables stuff like is_integer?
. Oh, Haumea doesn't allow question marks in names anyway lol
@Jonathan50 You can't on quite a few other languages either 📦
@Jonathan50 Yeah, there are certainly problems with question marks. :P
I think it's honesty pretty difficult to design a perfect comment syntax for this language, because comment syntax needs to be concise and not interfere with other syntax, but in this case it should also be relatively readable. :/
@TheMonsterFromTheDeep Maybe #
or even --
? Python, Elixir use the former, Lua the latter, and they all are similar to Haumea in style. I'm kinda leaning to them since, now that I think of it, \\
feels too "advanced" for a language of this kind.
There's the Smalltalk-style "..."
.
Shell style
#Comments
I don't dislike --
.
C style
- Files are a superset of markdown. Executable code is indented; comments are everything else...
That's interesting, I actually have heard of a language like that, but I don't know how many people are going to be writing documents that have Haumea code in it.
I actually have heard of a language like that
I did shamelessly steal the idea from Eve :)
I like --
, lua-style, or ?
, both of which continue until newline.
Multi-line comments are needed though.
If I had to pick one of the 6, I'd say JS/Python style.
Or you could do (for begginer friendliness)
comment
...
end
^^^
@joker314 I honestly can't tell if that's sarcastic or not.
I really like the question marks so far, but what about for multiline comments?
???
Blah
???
That could work.
Unless somebody writes a comment like
WHYY????
which will unfortunately close the comment
???
could require a line dedicated to itself.
? I'm a comment.
blah blah do
???
this is a multiline comment
really??? yes
???
stuff
end
or
***
Comment
***
I saw that. :P
Provided somebody writes syntax definitions for Haumea, the actually character shouldn't matter too much since comments would be highlighted :wink:
I keep on reading "Haumea" as "Haulea"
In the ***
system, you can't posssibly write Terms and Conditions apply***
so it should be fine, and allow you to write comments in between tokens:
while ***this will loop*** x < 5 do
nanalan, yeah, but what if somebody is using Notepad to write Haumea
I guess inline comments are nice..?
? This will loop
while x < 5 do
But I prefer this placement of comments..
Of course but some people might write long one liners
@joker314 THEN THEY ARE NOT WORTHY TO USE HAUMEA!
eheehe
some stuff ? hi
?
until a newline anywhere could work.
while (
this and ? ..
that and
this or even that ? ..
)
I really like ? this is a comment
for single line comments, and
???
Hi!
???
for multiline comments
gj with the markdown there :sunglasses:
I suppose I'm not allowed to +1 that, given I brought up the idea. :tada:
@BookOwl I also like the fact you used the same font that Gwiddle uses (?) for the Haumea logo :shipit:
Really? I never knew that.
Also, if users REALLY want inline multiline comments, they could do
while ??? This is my condition ??? foo() ??? This is my statement. ??? do
bar()
end
Exactly.
If anybody has any major objections to question mark comments, speak up now.
My idea works too
while ***This is my condition*** foo() *** This is my statement. *** do
bar()
end
Hey, why not have two comment thingies
I think I like ***
better than ???
but is just my opinion
This is probably important. 😉 EDIT: After discussion, I've decided to use
/* Comment */