-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
How to declare functions which never returns. Those functions are useful when function is acts as termination so it exits whole application or always throws something.
- In C++ is
[[noreturn]]attribute. - In Swift is
Neverreturn type. - In Rust is
!return type.
I don't think this is important now, but for the future version of the language. Mainly it helps the compiler to optimize code.