Skip to content

Improve the fn pointer types #1037

Open
@nikomatsakis

Description

@nikomatsakis

The current function pointer types have some downsides:

  1. They assume that all functions are static code that lives forever. This isn't true for JITs or DLLs.
  2. They are always non-nullable, safe pointers. This may not be what you want -- particularly the nullable aspect. This is connected to the previous point, because it implies that there is no place to attach a lifetime in the current syntax.

This is a "postponement issue". There have been various RFCs aiming to improve this:

It should be possible to adapt these schemes backwards compatibly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions