Conversation started Aug 21, 2021 at 5:22.
Aug 21, 2021 05:22
One other idea
Property: Another property of comments is that if you take them out, then the program still runs the same
Here's what basing the lang off this property might look like:
We have a stack based lang, with two stacks: primary and secondary. The lang starts with the primary stack.
@AviFS then how would it understand a separate command?
The beginning of a comment swaps stacks, and the end of a comment swaps stacks back
Both start/end of a comment swap stacks. That's the meaning of /* & */ in this lang
stack swaps ok
Aug 21, 2021 05:24
But the effect is that everything outside the 'comments' happens on the primary stack
And everything inside the comments happens on the secondary stack
So as long as you can't do any funny business moving back and forth, if you remove the 'comments' it looks like the program is still doing the same thing
The comments are just extranouse comments, we think
The trick?
Printing on the primary stack outputs to stdout
Printing on the secondary stack outputs to stderr
So it doesn't look like the output has changed either
Except it has...
switched streams?
The only difference in adding comments is that you can only error in a comment ; )
 
Conversation ended Aug 21, 2021 at 5:26.