Experimenting with variable reuse within declarations and its issues

This syntax is ambiguous still. How do you declare the ok but reuse the variable before? Your syntax cannot allow for it.

var, ok := foo()
var:, ok = foo()
var, ok: = foo() // same as the first one
var, ok: := foo() // ambiguous with `::` followed by `=`

There is a reason I said this twice:

I AM NOT LOOKING FOR SYNTAX SUGGESTIONS. PLEASE DO NOT GIVE ME THEM!


I thinking more and more that this idea has more cons than it has pros.

2 Likes