Subject: Re: extremely long compile time with large number of string literals
From: Thiago Macieira (thiago_at_[hidden])
Date: 2020-07-09 15:07:27
On Wednesday, 8 July 2020 23:22:57 PDT Artur Czajkowski via Std-Discussion
> " The standard doesn't
> care if the algorithms rerquired to implement it are quadratic or cubic or
> exponential. " [Misspelling original]
> Pity, because standard should care about things of such importance.
> You (the committee) are destroying the C++ language.
I am not part of the committee and definitely can't speak for it.
That said, the committee is composed of people and they will look at whether
an implementation is possible and reasonable before standardising it.
The question that arises is when there's a conflict: if it's an interesting
new feature that requires a lot of compilation time and pre-work, but which
greatly helps developers write efficient and readable code, should they
standardise it? I would say so. And initializer_list is one such thing.
Moreover, there's also the problem that some features can be misused or
abused. Creating 50k std::string in the same function is probably a bad idea,
let alone in the same statement. The exception handling code that needs to be
generated will be enormous.
Just because something is possible doesn't mean it's sensible to do it. And in
this example, clearly there are better ways of achieving the goal.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel System Software Products
STD-DISCUSSION list run by firstname.lastname@example.org
Older Archives on Google Groups