removal of dead functions and methods

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 24 06:04:44 PST 2014


Hello.

i was never thinking about it, but recently i found parts of source
code in my compiled D binary. they comes from code generation
functions, which only used in compile time, yet still happily sits in
resulting binary. are there any plans to somehow "fix" that?

i know that this is more a linker issue, but having unused code with
unused parts of the source in resulting binary can be undesirable
sometimes.

sure, we can "fix" this by using "functional templates" instead of CTFE
functions, but this is not always handy. and i think that "functional
template programming" consumes more memory than CTFE (yet i didn't
check this).

for now just remember that strings from your CTFE-only functions can
get into resulting binary, so don't write fun comments about your
customers there. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141224/f41e98e1/attachment.sig>


More information about the Digitalmars-d mailing list