[OT] Godot Engine: Disable C++ exception handling

Guillaume Piolat first.name at gmail.com
Fri Aug 18 13:08:06 UTC 2023


On Friday, 18 August 2023 at 10:06:44 UTC, Hipreme wrote:
>
> Also, my own JSON implementation consistently got 50% of the 
> time used by std.json, probably for not throwing any kind of 
> error, it is almost a drop-in replacement for it, except you 
> manually check after parsing.

Also kinda in the process of removing exceptions, in order to 
converge upon the custom WebAssembly druntimes that float around. 
Our exceptions were manually allocated anyway with a bearing on 
the catcher.
A pattern that can help is the fail() bit a bit like std::file or 
FILE*. It's the same morass of error codes and boolean a bit 
everywhere, but we can hide it from the library user.
For parsers, having popBack() throw is expensive so it can be 
valuable too to lessen exception usage.


More information about the Digitalmars-d mailing list