Re: Gradual 'tree' typing and C++

Iain Sandoe via Gcc <[email protected]> Tue, 21 Jul 2026 16:49:27 +0100
Newsgroups gmane.comp.gcc.devel
Message-ID <[email protected]>
Hi Arsen,

> On 21 Jul 2026, at 15:12, Martin Uecker via Gcc <[email protected]> =
wrote:

> Am Dienstag, dem 21.07.2026 um 14:19 +0200 schrieb Arsen Arsenovi=C4=87:=

>> [for convenience, I'll be using 'ttree' to refer to the hypothetical
>> gradually-typed tree system and its central type]
>>=20
>> Martin Uecker <[email protected]> writes:
>>=20
>>> I do not think so. Alone the compile-time cost of templates makes =
this
>>> a bad trade-off in my opinion, and I find compilation time already =
to
>>> be problematic for GCC.
>>=20
>> That's a reason to improve the GCC implementation of templates (of
>> course, no easy feat), not to make GCC less maintainable.
>=20
> you seem to take it for granted that it templates improve
> maintainability, but in my personal experience the opposite
> is true.

+1 on that, I think that they make debugging experience worse =
(independent
of the compile-time impact).

Also, as I see it the basic model for TREEs is one of multiple =
inheritance - the
c++ virtual function model** would seem a better fit (but I am not =
volunteering to
implement if :D )

Iain

** that is perhaps even more true for the hooks infra - which would =
benefit from
default arguments etc if it were implemented there.