Can the double semicolon be removed in the toplevel?

I looked at the referenced utop issue ( Analog to utop’s accept-current-phrase · Issue #24 · dbuenzli/down · GitHub ) and … this looks like it just squirts a “;;\n” into the stream to the toplevel ?

Maybe what you mean is that -users- who use GUIs and other front-ends to interact with the top-level, shouldn’t need to type “;;” ? That is, when I use Emacs, Shift-RET should squirt that “;;” down the pipe ? If so, then sure, that’s wonderful. But it’s also different from eliminating “;;” from the grammar, right?

Concretely, we communicate with toplevel via character I/O streams. As Marshall Rose put it so well (so long ago), there are three ways to signify the end of a packet (in this case, a top-level phrase):

  1. a sentinel
  2. a length-count
  3. connection-blasting

In the context of a language with a grammar, length-counting corresponds to ensuring that the grammar’s phrases always terminate at a point where no lookahead is needed to conclude termination. That’s … complicated. connection-blasting is a non-starter (it means to open a separate connection for each phrase). And a sentinel … well, that’s “;;”.

I just want to be clear: I love the idea of mapping Shift-RET to “do what is needed to tell the top-level that the current input terminates a top-level phrase”. I just don’t see how that changes the raw top-level and its grammar.