Jeremie Pelletier wrote:
bearophile wrote:
Don:

I've often thought that a pragma for a module to "don't generate module info" would be very useful for executable size.

Do you use the LDC compiler?

LDC has the pragmas:
pragma(no_typeinfo): You can use this pragma to stop typeinfo from being implicitly generated for a declaration.

pragma(no_moduleinfo): You can use this pragma to stop moduleinfo from being implicitly generated for a declaration.

Sounds great. They should be standard.


I've never used those yet, I'll try them soon.

But you meant something more global, module-wide. Maybe you can ask to LDC devs. I agree that having standard and not compiler-specific features is better.

Bye,
bearophile

I would much prefer these to be compiler switches, so you can make them global with very little effort.

That's a completely different use case, I think. For internal modules, the existence of that module is an implementation detail, and shouldn't be externally visible even through reflection, IMHO.

Reply via email to