Skip to content

Noreturn functions #12

@NTSFka

Description

@NTSFka

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions