Gradual 'tree' typing and C++
Debate on whether gradual typing in GCC trees relies on C++ templates and its maintainability impact.
Martin Uecker questions Arsen Arsenović’s assertion that gradual typing in GCC’s tree representation would improve maintainability, arguing that it does rely on C++ templates as the implementation mechanism. Arsenović clarifies that the maintainability benefit stems from gradual typing itself, with templates being a means to implement it in C++.
- contributor
Questions whether maintainability benefits of gradual typing in GCC trees are independent of the reliance on C++ templates.
“This is what we are discussing, isn't it? I am not critizing gradual typing per se.”
- proposer
Clarifies that the maintainability benefits of gradual typing are inherent to the concept, while C++ templates are a specific implementation detail for GCC's tree system.
“No, the idea that introducing gradual typing over trees could improve maintainability does not presume templates. An in-C++ implementation of such typing does, of course.”
- contributor
Expresses a preference for ancient C code over complex C++ regarding maintainability and compiler internals.
Technical Tradeoffs
- Implementation Language Choice: Debating the trade-offs between using C++ templates versus other GCC extensions or approaches for implementing new features.
- Maintainability vs. Complexity: Discussing whether the proposed C++-based gradual typing will ultimately improve or worsen the maintainability of GCC's internal codebase.
- Ergonomics vs. Purity: Considering the trade-off between an ergonomic, potentially external, implementation and sticking to GCC's internal C++ paradigm.
In Details
This exchange continues the debate on introducing gradual typing to GCC internal 'tree' representations. The core of the argument is whether the proposed maintainability benefits are tied to the specific implementation choice of using C++ templates for GCC's C++-based internal code, or if the benefits are inherent to gradual typing itself. This touches on the broader question of GCC's internal development language and style.
- tree
- GCC's internal representation of abstract syntax trees, used to represent and manipulate code during compilation.
- gradual typing
- A type system that allows a program to incorporate optional static type annotations within dynamically typed code, enabling a gradual transition and a mix of static and dynamic typing.
- C++ templates
- A C++ feature that allows for generic programming, enabling functions and classes to operate with user-defined types, and enabling code reuse.