You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Never return 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.
The text was updated successfully, but these errors were encountered:
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.
[[noreturn]]
attribute.Never
return type.!
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.
The text was updated successfully, but these errors were encountered: