Syntax flubs
Posted Feb 4, 2010 18:25 UTC (Thu) by
tjc (subscriber, #137)
In reply to:
Syntax flubs by ncm
Parent article:
GCC to merge Go support
I agree, using '@' as an indirection operator would work. But it looks funny, especially as a postfix operator. I would probably get used to it.
I better like the idea of separating declaration syntax from expression syntax and using '*' as a postfix pointer declarator and '[]' as an infix[1] indirection operator, like this:
var p *[10]int;
var a [10]*int;
[p][0] = 1;
[a[0]] = 1;
I guess I could call this "square lisp" syntax. :)
[1] This really isn't infix, since the operand is infix, not the operator, but I don't know the correct term for this form.
(
Log in to post comments)