Arc Forumnew | comments | leaders | submitlogin
2 points by iopq 4707 days ago | link | parent

well, you already make whitespace significant by saying that alphabeta is not alpha beta

the real crux of the issue is whether it comes before an identifier or after don't think of it as whitespace disambiguating nobody says *pointer in C is "too significant whitespace" just because it can't be separated by a space (in which case it becomes multiply!)



1 point by Pauan 4706 days ago | link

Like I said, I think it's only a bit too far, so if somebody wants to run with that idea, go for it. I personally favor the idea of having multiple syntaxes that parse to the same AST.

-----

1 point by akkartik 4707 days ago | link

I didn't know you couldn't have a space after deref!

But, I dunno.. attaching ';' to identifiers is different from attaching '*'. Our brains are trained to treat the semi-colon as punctuation, never part of a word. Even programming languages have only reinforced this pattern. It's going to be a hard habit to break.

-----

2 points by rocketnia 4706 days ago | link

"Our brains are trained to treat the semi-colon as punctuation, never part of a word. Even programming languages have only reinforced this pattern. It's going to be a hard habit to break."

Give it 100 years. ;)

-----

1 point by Pauan 4706 days ago | link

I'm assuming ";" was just an example... I would personally use ":" rather than ";" if I used only one character.

-----

3 points by iopq 4705 days ago | link

I would personally use something like | if it's not used for anything

it looks like an undirected paren so in cases like a |b| c it translates to a ((b) c) or (a (b)) c I guess I'd pick the first option (more natural for reading left to right), but for the order of operations it doesn't matter

-----

2 points by akkartik 4705 days ago | link

I like this! It seems the semi-colons were blinding me to the possibilities :)

-----