[Wish] Don't compile unused subs

barx

Well-Known Member
Licensed User
Longtime User
This is mainly for using classes.

Example:

I add a class to my project 'clsA'

within clsA we have numerous functions/subs

Public FunctionA
Public FunctionB
Private FunctionC
Private FunctionD

So, with my app I Don't use all the features of said Class.

I call FunctionA which processes some data and itself calls FunctionC and FunctionD

But, FunctionB never gets used because I don't need that functionality.

It would be nice if the compiler didn't compile FunctionB thus saving resources, etc.

I could go through the class tracing calls to see what isn't used and delete manually, but this is a) very time consuming in complex classes, b) very prone to user error in that I delete something that is actually used but I missed the call to it, c) if new version of the class is released and I update my project to use new one, all the previously removed functions are back.
 
Top