Improve type generic programming - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Rapport (Rapport Technique) Année : 2021

Improve type generic programming

Résumé

C already has a variaty of interfaces for type-generic programming, but lacks a systematic approach that provides type safety, strong ecapsulation and general usability. This paper is a summary paper for a series that provides improvements through N2735. type inference for variable definitions (auto feature) and function return N2736. function literals and value closures N2738. type-generic lambdas (with auto parameters) N2637. lvalue closures (pseudo-references for captures) The aim is to have a complete set of features that allows to easily specify and reuse type-generic code that can equally be used by applications or by library implementors. All this by remaining faithful to C’s efficient approach of static types and automatic (stack) allocation of local variables, by avoiding superfluous indirections and object aliasing, and by forcing no changes to existing ABI.
Fichier principal
Vignette du fichier
n2734.pdf (1.03 Mo) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03106758 , version 1 (12-01-2021)
hal-03106758 , version 2 (10-06-2021)
hal-03106758 , version 3 (06-10-2022)

Identifiants

  • HAL Id : hal-03106758 , version 2

Citer

Jens Gustedt. Improve type generic programming: proposal for C23. [Technical Report] N2638, ISO JCT1/SC22/WG14. 2021, pp.82. ⟨hal-03106758v2⟩
142 Consultations
348 Téléchargements

Partager

Gmail Facebook X LinkedIn More