lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable C++ exceptions (issue 571430048 by address@hidden)


From: nine . fierce . ballads
Subject: Re: Disable C++ exceptions (issue 571430048 by address@hidden)
Date: Mon, 27 Jan 2020 13:05:27 -0800

> 1) Drop exception handling around scm_boot_guile
> Doing this at the end of main() is pointless.

Agreed.  (It should have been caught by reference anyway.)

> 2) Disable exception handling code
> We don't throw in LilyPond and it's only bloating the executable:
> before: 192,586,512B
> after:  166,845,952B (-13.3%)

A. Do we care that much about about 30 MB?  Is someone complaining?
B. The standard library may throw for various reasons.

> This might also have a positive effect on the build time

I have no experience with this.

> as well as performance during runtime

Not likely.  The cost is about zero until one is thrown.  I've worked on
high-availability, high-performance network packet processing products
where we used exceptions to good effect.

I don't have a better reason to oppose disabling exceptions than that
I've found them useful in other projects, so I'll say LGTM; but I think
we could offer posterity a better justification than 30 MB and maybe
build time.

To me, the most convincing argument for disabling exceptions (which in
g++ turns them into abort(), IIUC; I'm not sure about clang) would be
that you don't want LilyPond contributors to have to write
exception-safe code.  It's not natural for C programmers coming into
C++.  Also, I'm sure you've already got some.

https://codereview.appspot.com/571430048/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]