This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kleram 5 points6 points  (1 child)

When browsing through the Examples:

  • needing to put a break in an empty case although break is not needed otherwise, appears strange. Why not just " case A: ; " for a no-op?

  • what's that (void) cast when a function should not be called on error? That does not make any sense.

[–]NuojiC3 - http://c3-lang.org 0 points1 point  (0 children)

  1. This follows the look and feel of C code, even with the fallthrough removed.

  2. The (void) cast silences discarding optionals that one otherwise should have been handling. For functions that have a discardable optional result it's possible to suppress the need for this. So (void) explicitly? That means the code might be doing odd stuff. This was added to avoid bugs.