Skip to Main content Skip to Navigation
Reports

Improve type generic programming: proposal for C23

Jens Gustedt 1
1 CAMUS - Compilation pour les Architectures MUlti-coeurS
Inria Nancy - Grand Est, ICube - Laboratoire des sciences de l'ingénieur, de l'informatique et de l'imagerie
Abstract : 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.
Document type :
Reports
Complete list of metadata

https://hal.inria.fr/hal-03106758
Contributor : Jens Gustedt <>
Submitted on : Thursday, June 10, 2021 - 10:46:12 AM
Last modification on : Friday, June 11, 2021 - 3:34:27 AM

File

n2734.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-03106758, version 2

Citation

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

Share

Metrics

Record views

7

Files downloads

53