haumea-lang / haumea-rs

Haumea is an experimental language designed to be simple and easy to learn and program in.
MIT License
7 stars 2 forks source link

Comments #6

Closed BookOwl closed 7 years ago

BookOwl commented 7 years ago

This is probably important. πŸ˜‰ EDIT: After discussion, I've decided to use /* Comment */

BookOwl commented 7 years ago

@joker314 That could get confusing having two different comment syntaxes.

joker314 commented 7 years ago

*** works when interlacing inside of statements because it is perfectly symetrical.

BookOwl commented 7 years ago

That's true

bates64 commented 7 years ago

Also, if users REALLY want inline multiline comments, they could do

while ??? This is my condition ??? foo() ??? This is my statement. ??? do
 bar()
end

I dislike that - it could create problems with ??? within the comment themselves.

BookOwl commented 7 years ago

Great job with markdown @nanalan 😎

joker314 commented 7 years ago

I was just about to say that

CosmicWebServices commented 7 years ago

@BookOwl What will you choose? *** or ??? I will leave the decision to you. 😎

joker314 commented 7 years ago

I gtg, πŸš† ride!

CosmicWebServices commented 7 years ago

bye

BookOwl commented 7 years ago

Also, if users REALLY want inline multiline comments, they could do

while ??? This is my condition ??? foo() ??? This is my statement. ??? do
bar()
end

I dislike that - it could create problems with ??? within the comment themselves.

That's true, I think I'll stick with @liam4's idea of having the ??? have to appear on it's own line.

CosmicWebServices commented 7 years ago

Or *** Just saying much simpler

BookOwl commented 7 years ago

But that still has the problem with *** appearing inside a comment.

CosmicWebServices commented 7 years ago

Really???

BookOwl commented 7 years ago

while foo() *** Hey, a comment *** <- See that? *** bar()

CosmicWebServices commented 7 years ago

Well this issue exists in a lot of languages it can be avoided less with my version

birdoftheday commented 7 years ago

You should probably choose the simplest choice. There's no need to make up something new and complicated just because it's original.

// or even # would work just fine.

birdoftheday commented 7 years ago

That said, I would not be opposed to something original, it would just have to follow these guidelines (for me, at least):

bates64 commented 7 years ago

// or even # would work just fine.

I disagree @birdoftheday, what about float division? (/ vs //)

bates64 commented 7 years ago

@birdoftheday provided ? isn't part of the syntax, how could it be seen as code? ;P

birdoftheday commented 7 years ago

condition ? something : somethingelse is in a lot of languages.

birdoftheday commented 7 years ago

It just looks kind of odd to me.

? this does something
? it also does something else
5 + 5 ? this calculates five plus five
birdoftheday commented 7 years ago

It's kind of hard to separate the 5 + 5, the code ,and the ? this calculates five plus five, the comment

bates64 commented 7 years ago

Not in Haumea :shipit:

Regarding inline ifs, @BookOwl have you considered newlines being optional? It's a functional piece of syntax but it looks quite nice

x = if 1 = 1 do 25 else 45
BookOwl commented 7 years ago

condition ? something : somethingelse has always been confusing to me, so if I add it it would have different syntax.

birdoftheday commented 7 years ago

All I'm saying is that ? kind of looks like an operator to me. It might be different for other people.

birdoftheday commented 7 years ago

@BookOwl Why not just #?

bates64 commented 7 years ago

@birdoftheday not saying I use them, but have you ever used an Apple keyboard? :stuck_out_tongue_winking_eye: # is really difficult to type on them :(

birdoftheday commented 7 years ago

@nanalan Yes

towerofnix commented 7 years ago

not saying I use them, but have you ever used an Apple keyboard? 😜 # is really difficult to type on them :(

pinky on (left) shift, index on 3, ###, :tada:

I really don't find that difficult to type!

EDIT: Yes, I'm using an Apple keyboard.

BookOwl commented 7 years ago

What about @TheMonsterFromTheDeep's idea of using <? ... ?>?

BookOwl commented 7 years ago

Well, I've programmed skipping comments into the scanner, so as soon as we can decide which comment syntax to use I can push it.

BookOwl commented 7 years ago

FINAL VOTE

  1. /* This is a comment */
  2. <? This is a comment ?>
  3. ?? This is a comment ??
  4. -- This is a comment --
  5. <- This is a comment ->
BookOwl commented 7 years ago

Currently my favorites are 2 and 3, but I'm open to any of them.

bates64 commented 7 years ago

2 for multiline, just ? (to newline) for inline.

(@BookOwl: why aren't you on Gitter? :disappointed:)

CosmicWebServices commented 7 years ago

1 and 5 and ** This is a comment **

BookOwl commented 7 years ago

Because I'm busy. What do you want to talk about:

ghost commented 7 years ago

Every one of them except for 2 and 5. I don't really imagine <> being used in a language of this style, other than for comparing.

BookOwl commented 7 years ago

What do you think of 3?

bates64 commented 7 years ago

What do you think of 3?

It's nice, but I like the idea of having different start/end tokens.

joker314 commented 7 years ago

There are 6 reaction emojis, so why not vote using them

1 - +1 2 - -1 3 - Laugh 4 - Hooray 5 - Confused

Please select with the option below. I have initialised them all so that you can just click the one you want. However, this means I cannot vote. You ARE allowed to vote more than once.

tjvr commented 7 years ago

pinky on (left) shift, index on 3, ###, πŸŽ‰

Alt+3 on non-US Mac keyboards. It did take me a while to get used to it when I first switched from a British PC layout. Not a big deal now though...

matthewr6 commented 7 years ago

?? This is a comment ??

Are you sure? :P

bates64 commented 7 years ago
  1. /* comment */ it is, then?
BookOwl commented 7 years ago

@nanalan I think so.

BookOwl commented 7 years ago

Comments have been added to master with commit 0db0ee9

They use the /* I'm a comment */ syntax. Thanks for the help everyone! :D

jeandrek commented 7 years ago

Multi-line comments are needed though.

Why do you think that?

@joker314 I honestly can't tell if that's sarcastic or not.

Why do you think that?

I saw that. :P

Your link is broken.

gj with the markdown there :sunglasses:

How can you see that…?

bates64 commented 7 years ago

I saw that. :P

Your link is broken.

His old comment, which he deleted.

gj with the markdown there :sunglasses:

How can you see that…?

Failed backtick-delimited code :stuck_out_tongue_winking_eye: He later edited it.

towerofnix commented 7 years ago

@joker314 I honestly can't tell if that's sarcastic or not.

Why do you think that?

@Jonathan50 I've found everything far too verbose in (at least some) languages like this. Having a huge comment syntax will just distract from the content of the comment! It's not particularly friendly to beginners - it's obvious, but once you've learned (the syntax) it's not hard to remember.

And I figured joker314 wasn't being serious when he suggested that (additionally, since it's a pain to type!).