Android Question Unused routines.

LucaMs

Expert
Licensed User
Longtime User
I just noticed that in a class module, private routines are reported as unused only if their name does not contain an underscore. Is this a design decision (is there a relationship with obfuscation?)
 

agraham

Expert
Licensed User
Longtime User
Upvote 2

LucaMs

Expert
Licensed User
Longtime User
So I have to assume that you participate in the development of Anywhere Software tools, right?
It could be, given that...

Erel il "member" since:
1644403641295.png


and you:
1644403744663.png


:)


P.S. So B4X is about to turn 15!
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
So I have to assume that you participate in the development of Anywhere Software tools, right?
I helped Erel in the initial development of B4A as I was a significant contributor to its predecessor Basi4ppc. I was the first (as far as I know) to run the initial versions of B4A to identify bugs and feedback to Erel. I wrote many of the initial libraries, some of which, like Reflection and ByteConverter are now part of the B4A standard libraries and some, like Threading, while important initially are less so now that Erel has written asynchronicity into other libraries that most benefit from it.

From one of our interchanges in 2010 during the development of B4A prior to release.

Hi Andy,
I've uploaded a new version of the IDE and the java projects.
Most of the issues we discussed should be fixed.
There are many small improvements.

[technical stuff omitted/]

I'd be happy to hear your comments if you like to play with it. It is located under /beta/b4a.zip.

Regards,
Erel

😛
 
Upvote 1

LucaMs

Expert
Licensed User
Longtime User
I am about to clarify what I meant and then "close" the thread, as I have been privately asked questions.

The purpose of the warning about unused subs is to allow you to delete them in case you really don't need them anymore.

However, if the name of one of my routines that I will not actually use anymore (old version of my source) contains an underscore, the warning will not happen and my source will be less "clean".
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
I helped Erel in the initial development of B4A as I was a significant contributor to its predecessor Basi4ppc. I was the first (as far as I know) to run the initial versions of B4A to identify bugs and feedback to Erel. I wrote many of the initial libraries, some of which, like Reflection and ByteConverter are now part of the B4A standard libraries and some, like Threading, while important initially are less so now that Erel has written asynchronicity into other libraries that most benefit from it.

From one of our interchanges in 2010 during the development of B4A prior to release.



😛
Glad to know about it 👍
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
However, if the name of one of my routines that I will not actually use anymore (old version of my source) contains an underscore, the warning will not happen and my source will be less "clean".

The compiler cannot know which subs are "events subs" and relies on the convention that such subs have an underscore in their name.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Yes, @AnandGupta , even if I sometimes read lightly, too fast, and maybe I will lose my sight and the last two neurons, for the moment I think I understand the answer.

But, again... if I were to create/have (old module) a Sub whose name contained an underscore and my project didn't use it, it would be useful for me to have the IDE warn me; otherwise I am forced to avoid underscores in Subs that are not events.

My answers are probably convoluted 😄
|
|
V

Two of the main problems of humanity:

1 - everyone's mother tongue should be Italian;

2 - the only existing programming language should be B4X.

😄
 
Upvote 0
Top