Closed iluuu1994 closed 3 years ago
I'm fine with it. My concern is that the syntax then becomes
case Foo;
or
case Foo { ... }
So you end up with a semi-colon OR a closing brace. That feels inconsistent, and I don't know if there are parser implications. But I don't feel strongly either way.
@Crell I just feel like that would be more consistent with existing language constructs.
if ($x);
if ($x) {}
while ($x);
while ($x) {}
function foo();
function foo() {}
etc.
Fair. I'll update that once the primitive PR is merged. Want to do that for now at least as a discussion point, or is there more to adjust for now?
Feel free to merge the PR and I'll adjust that afterwards.
From the RFC:
I think there should be no semi-colon here. This way we're consistent with methods with or with no body.
https://3v4l.org/Y0Fe1
Thoughts?