I'm not crazy about it either, but it's worth noting that code itself
isn't symmetric. The parser reads it from left to right, as do our
eyes.
> This is a call for any thoughts on how you can make this more
> symmetrical. My own initial idea was to use a semicolon to break up
> method calls. So that the previous example would be
>
> foo bar bank baz; zoop
So right now in Magpie, this:
foo bar (bang baz) zoop
would look like this in Java or C++:
foo.bar(bang.baz).zoop
Are you saying your proposal of "foo bar bank baz; zoop" would mean
the same thing? How does it distinguish between:
foo.bar(bang.baz).zoop
and
foo.bar.bang(baz).zoop
> For a method with no arguments e..g print() this would become print;
>
> A newline or a "do" would count the same as a semicolon - so the
> following code
Newlines are actually equivalent to semicolons in Magpie right now.
You can use either as expression separators in a block. A semicolon is
rarely (never?) used in practice, but it's available if you wanted to
cram a few expressions on one line for some reason.
We could free it up for some other use, but using for anything other
than a separator/terminator would likely be deeply confusing for
anyone coming from a C/C++/Java/JS/etc. background.
> For 1 to 10 do
It might still be possible to accomplish that with some other proposal.
> Not sure if I'm explaining this correctly (it is late, I've got a cold
> and I'm tired) but hopefully someone will understand what I'm trying
> to say :-).
I kinda followed it, but not totally. :)
- bob