Okay, after attempting and failing to take a nap, I think I know what's
bugging me about "long dot".  It seems just a little too specific.

So here's another proposal.  We've been saying forever that we don't
need start/stop comments.  But maybe, just maybe, if they also cure the
delayed postfix problem, it's worth it.  Suppose that, rather than something
traditional like /* ... */, we define our comment delimiters as

    .# ... #.
Then instead of:

    $x.   .()


we could instead have

    $x.#   #.()


and that actually reduces down to $x() in either case.  That is,
the dots look like dots but neither of them is a real dot, which works
for anything but .foo methods, which would have to be something like:


which is a bit unfortunate, but maybe we can fix it somehow by making
one of the dots real.  Unfortunately that limits its use as a general
embedded comment.  So maybe the trailing delimiter is wrong.  Here's
anther idea: let people pick a delimiter:

    $x.#( comment  ).()

    $x.#[ comment

That would give us .#[...] as the general embedded comment form, and the
first dot is not a real dot, but any dot after the closing delimiter
would be a real dot.

If we make the delimiter anything following q/.../ rules, then
the one-liner form for lining up things gives us:

    :foo.#.      .(1,2,3)
    :foobar.#.   .(1,2,3)

If that's too ugly, I suppose would could make .\s short for .#. so
we could still write

    :foo.       .(1,2,3)
    :foobar.    .(1,2,3)
    :foobarbaz. .(1,2,3)

Also returns .. and ... to being completely unambiguous.

Another approach would be to say that the #// mechanism works without
the dot, but that seems like asking for trouble.  And it doesn't give
the mnemonic of a dot on either end.

    $x#( comment  ).()
    $x.#( comment  )()

    $x#[ comment
    $x.#[ comment

Which is actually okay for anything but regular methods:

    $x#[ comment
    $x.#[ comment

But I think it's just a little too easy to write #x by accident and
get x as the delimiter, so I'm leaning towards, .#// still.


Reply via email to