Skip to content

Make safety opt-out rather than opt-in, or at least less verbose #74

Open
@nihil-admirari

Description

@nihil-admirari
  1. According to the current proposal, all new code in C++ will have to designate every function as safe, which is quite tedious. Maybe makes sense to make top-level #feature on safety automatically mark every function in the translation unit as safe without the need to repeat oneself?
  2. C++11 changed auto from a storage specifier into a type inference facility in a backward incompatible fashion, assuming that auto wasn't really used in pre-C++11 code. C++20 introduced modules, which are currently supported by only one compiler. Would it be possible to make modules safe by default in a backward-incompatible way (just like with auto), exploiting the fact that modules are still essentially unused? Or to introduce export safe module in which you don't have to keep writing safe all the time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions