On Wednesday, 21 June 2017 at 16:23:53 UTC, MysticZach wrote:
void foo()
{
   int bar(Args...)(Args args)
      if (Args.length > 2)
      in (args[0] != 0)
      in (args[1] > 1)
      out /*whoops, forgot `( )`*/(result) { ... }

   do { ... }
while (true); // Error: while statement cannot contain just `;`
}

Honestly this doesn't seem like a big deal, as I'd imagine it'd be hard not to notice that code like this wasn't working as expected. And also extremely rare. So I'm still in favor.

I see. Well, I would only see that as an issue if it would compile and then generate code that differs from what one intended. But since it errors out, I don't see a problem, either, though it would be best to enhance that error message to give a hint that the programmer may have triggered that ambiguous case by accident. Something like "Did you mean `out() (result)`?"

Reply via email to