Sujet : Re: encapsulating directory operations
De : wyniijj5 (at) *nospam* gmail.com (wij)
Groupes : comp.lang.cDate : 08. Jun 2025, 15:52:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <29b9613069183212a224d4e31d6e8e3ff8344113.camel@gmail.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Evolution 3.56.2 (3.56.2-1.fc42)
On Sun, 2025-06-08 at 10:06 +0200, Bonita Montero wrote:
Am 07.06.2025 um 21:56 schrieb wij:
I see std::filesystem as evidence that C++ finally admits the deficiency of
its advance error handling system (std::exception). But the result is worse
> than C.
That's just a mere assertion without any facts.
I know a bit of the development of std::filesystem. The view of mere 'standard'
disregards fact and uses more the 'assertion' criticized.
In fact, exception
handling makes error handling possible with a fraction of the code
length, because most parts of the code don't need to handle errors,
"dont' need" is illusion, errors are always there, mostly ignored and encouraged
to ignore by simplification.
whereas in C they do. In C every call level has to deal with erorrs,
whereas in C++ only one level at the upper edge has to catch the
errors.
C has not hard coded what 'exception' should be. E.g. C can also set an error
object and let interested code to handle it in many ways, what's left is impl.
issues.
But, I think the 'throw' mechanism (not std::exception) is good, like many
others. 'throw' is more like a soft assert failure, which is no error handling.