The Right Approach to Exceptions

deadalnix deadalnix at
Sun Feb 19 04:51:00 PST 2012

Le 19/02/2012 13:32, Jonathan M Davis a écrit :
> On Sunday, February 19, 2012 13:20:19 deadalnix wrote:
>> Why is the executable size such a big issue ?
> Some people complain bitterly about any additional size to the executable at
> all, whether they use all of the symbols in it or not, and if they don't use
> all of the symbols, then they're that much more annoyed by the additional
> size. It crops of semi-frequently around here that someone complains about how
> big hello world is. Most of the problem goes away if phobos because a shared
> library like it's going to eventually, but someone is always going to be
> complaining about binary size - especially with a systems language.
> - Jonathan M Davis

I know that people complain. But most of them are unable to explain why 
it is a problem.

Plus, hello world size is a very stupid exemple accroding to me. It is 
just like comparaing sorting algorithms with an array of 5 elements. The 
code bloat that Exception would add is in O(1). So it will get 
irrevealant in every non trivial program toy like hello world.

Note that Hello World in Java is about 50Mb. It is because the stdlib is 
big. And it has much more played in favor of java than against. Plus, we 
consider adding perfect GC (or at least on heap), which would be O(n) on 
the code bloat. This may be not noticeable on an hello world program, 
but this will sure generate more code bloat on any real application.

More information about the Digitalmars-d mailing list