Do we need something to indicate the end of the line? Like ';' in C/Java? Or just CR/LF in Visual Basic?
Or, can we count on the parsability of the individual tokens to know when a line ends?
For example, it can be assumed that I HAS and IM IN YR start new lines. And anything after IM OUTTA YR or KTHX starts a new line as well. Can this be assumed for all tokens?
— Risser, 2007/05/29 16:19
Maybe a full stop, to signify that the sentence is over. Or new line is the end of the line.
Once we started trying to formally define the grammar, it will probably become clear whether we need a terminator. I think we should try to go one without one until that point though…it seems to read “better” without one. — ILikePi, 2007/05/29 16:30
I have to agree with ILikePi, it reads “better” without a formal end of line.
— shox, 2007/05/29 18:05
I think it should have a formal end-of-line, and that should be the return key ;)
Periods could be optional, I suppose, to put two “sentences” on the same line…. — Kyle, 2007/05/30 17:28
The problem is EOL conversions. Do we use CR (Mac), LF (Unix), or CRLF (Windows)?
There doesn't seem to be a “best” solution to this, besides deciding arbitrarily.
— GMan003, 2007/05/30 17:33
I like the idea that the newline should be the end-of-line. In all the code I've seen so far, no one has put more than one statement on the same line, and I think it reads much better than trying to punctuate it. Besides, that frees up the punctuation for other things.
As for line-endings, why not just support all 3? If an interpreter or compiler gets to a CR, check that the next character is LF. If it is, treat the two together like a line break, and if not, just treat the CR like a line break. No one's using LFCR, so just treat LF as a line break. — Michael Buckley, 2007/05/30 18:21
Well, looking at comments, even if the rest of it works without EOL markers, you at least need to handle them to know when the comment is over.
Also, I've written really long math expressions over two lines, but that doesn't mean they can't all be forced to be on one line. — Peter Risser, 2007/05/30 19:06
Maybe for long expressions, MOAR or ALSO could be used to say “this line is a continuation of the previous line.” — Isaac, 2007/05/30 19:13
I endorse what Michael Buckley said wholeheartedly. All three, dammit. Just because the language looks like a refugee from the early 80s doesn't mean that the parser has to be!
Continuation lines… mmmaybe. The only trouble with MOAR is that some of the other suggestions for it also sound good. — Adam, 2007/05/30 19:20
What Adam and Michael just said. — Church Tucker, 2007/05/30 19:29
Maybe the line-continuation could be some emoticon, like :) or <3 or something.
VISIBLE "TOO LONG LINE IN YR CEILING" N <3 "WATHCIN YOU CONCATENATE!!1!"
That could lead to degenerate usage like:
HAI
CAN
<3 HAS
<3 STDIO?
VISIBLE
<3 "HAI"
<3 N " WORLD!!1"
KTHXBYE
Yeah, that's weird. But it works. — Risser, 2007/05/31 19:45
Since we're using BTW for comments, this might be a good use for ^^, plus its similarity in appearance to ^^^^ used to refer to a previous post in a forum.
LOL "THIS IS A REALLY LONG ^^ LINE THING I AM SAYING ^^ BLAH BLAH BELAIR LOL"
Also, now that I think about it, I like using a comma for an optional embedded line break, to make the code more LOLish and less like code:
HAI, CAN HAS STDIO? LOL "HALO WURLD", KTHXBAI
- – xrestassuredx, 2007/05/30 20:26