ArnoldC icon indicating copy to clipboard operation
ArnoldC copied to clipboard

Possibility to add comments in the code

Open lhartikk opened this issue 11 years ago • 10 comments

For instance:

hash stands for comment

begin

IT'S SHOWTIME

print greeting

TALK TO THE HAND "hello world"

end main

YOU HAVE BEEN TERMINATED

or something more "arnold specific"

lhartikk avatar Feb 25 '14 15:02 lhartikk

IT'S NOT A TOOMAH, IT'S your comment

et avatar Feb 25 '14 21:02 et

I am also a fan of IT'S NOT A TUMOR, IT'S an ArnoldC comment.

CameronBanga avatar Feb 25 '14 21:02 CameronBanga

Just to throw in some variety... LET OFF SOME STEAM your comment

https://www.youtube.com/watch?v=19R2fDXCzcM

ghost avatar Feb 25 '14 22:02 ghost

I was thinking:

WHAT THE HELL ARE YOU? comment

tristanpemble avatar Feb 26 '14 23:02 tristanpemble

I think it would be cool to have a language construct, enter YOU'VE JUST BEEN ERASED,, that allows one to comment out statement blocks in a semantic manner.

Basically done implementing it, just brushing up some stuff, have a look at one of the test cases:

IT'S SHOWTIME
  HEY CHRISTMAS TREE vartrue
  YOU SET US UP @NO PROBLEMO
  STICK AROUND vartrue
    GET TO THE CHOPPER vartrue
      HERE IS MY INVITATION vartrue
      GET DOWN 1
    ENOUGH TALK
    TALK TO THE HAND "while statement printed once"
  CHILL
  GET TO THE CHOPPER vartrue
    HERE IS MY INVITATION @NO PROBLEMO
  ENOUGH TALK
  YOU'VE JUST BEEN ERASED, STICK AROUND vartrue
    TALK TO THE HAND "while statement that will not be printed"
  CHILL
YOU HAVE BEEN TERMINATED

Comments?

staslev avatar Feb 28 '14 22:02 staslev

I prefer a hash tag for comments rather than another one-liner. Comments should enhance readability without further adding to the "Arnold noise factor".

mrz1988 avatar Mar 04 '14 15:03 mrz1988

I favor the hashtag. Same reasoning as mrz1988.

lhartikk avatar Mar 04 '14 21:03 lhartikk

I feel silly debating the syntax of a language based on Arnold Schwarzenegger movie quotes, but..

Considering the language's direction has at no point been driven by either readability (in the programming sense) or practicality, personally, I don't see the point in starting now. Perhaps traditional hash tag comments could be used as an alternative; I do think block comments should start and end with Arnold quotes, however

tristanpemble avatar Mar 05 '14 15:03 tristanpemble

I agree wholeheartedly with @tristanpemble.

CameronBanga avatar Mar 05 '14 15:03 CameronBanga

Bumping an old thread, but was the ability to add comments ever added? hash does not seem to work.

garybrucey avatar Feb 23 '18 00:02 garybrucey