Re: Gradual 'tree' typing and C++
Project / Subsystem
gcc / gcc
Date
2026-07-21
Proposer
Jakub Jelinek <jakub@redhat.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Developer ergonomics vs. potential compile-time safety.
- • Code readability and maintainability.
- • Flexibility of existing macro system vs. C++ RTTI.
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- discussion_id
- al9pz_27btqZW8Df@tucnak
- source_type
- public_inbox
- title
- Re: Gradual 'tree' typing and C++
- headline
- Gradual 'tree' typing and C++
- tldr
- Debate continues on gradual typing for GCC's tree representation; Jakub Jelinek argues against it, citing increased complexity and lack of benefit for typical…
- proposer
- Jakub Jelinek <jakub@redhat.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Developer ergonomics vs. potential compile-time safety.
- • Code readability and maintainability.
- • Flexibility of existing macro system vs. C++ RTTI.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • gcc
- • compiler internals
- • c++
- • type system
- bugzilla_url
- —
- date
- 2026-07-21T00:00:00.000Z
Re: Gradual 'tree' typing and C++
Jakub Jelinek reiterates his rejection of the gradual ‘tree’ typing proposal, characterizing it as ‘extra pain.’ He elaborates that while static typing might offer theoretical advantages in some scenarios, the typical GCC codebase involves traversing and inspecting diverse tree/GIMPLE/RTL nodes, not expecting specific types. The proposed dyn_cast approach, he argues, adds unnecessary verbosity and complexity without significant benefit for these common use cases.