Jump to content

Recommended Posts

Posted

After several modifications to scripts, I end up with several #include that I am not sure still in use.

What is the best procedure for removing unused #includes then?

a) Delete the #Include and see if script will crash? rinse repeat

b) just have them and forget it...

 

 

Posted (edited)

You could also take a look at the thread organize-includes

EDIT :

  Quote

b) just have them and forget it...

Expand  

I would not recommend this, for the sake of clean code ;).

Edited by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted (edited)
Posted

It’s well known that all non-trivial programs are twice as long as they need be and contain at least one bug.

Therefore, recursively all programs can be reduced to one line of code - which is a bug.

Code hard, but don’t hard code...

Posted
  On 2/5/2021 at 4:33 PM, JockoDundee said:

superfluous #includes

Expand  

Maybe look up the definition of "redundant"?

Posted (edited)
  On 2/11/2021 at 10:28 AM, RTFC said:

Maybe look up the definition of "redundant"?

Expand  

Ok.

75A4AEBC-A309-4F67-8D30-0421502C34B2.thumb.png.d21883be2b66fd27e7efbea9fe9adced.png
I can see your confusion and I sympathize, at the same time and as you can see above, redundant can be used in a way that is not wholly synonymous with superfluous.  
To wit, redundant applied to the subject at hand could mean #includes that are repeated; as is not an uncommon usage, for example:

D7DCD439-68B8-494B-8624-5B139E14EE50.thumb.jpeg.804dd09c6cc8f676b3426d8735dbf3ca.jpeg
Redundant, used in that sense, draws a clear, if subtle distinction with superfluous; for instance an #include that is merely extraneous, as opposed to duplicative. Support for this parochial usage of superfluous in this sense is also extant.

If we apply our faculties for discernment fully, we would see that the OP is specifically referring to the use case most precisely defined as superfluous, (although, I do not deny that being superfluous always carries an unshakeable taint of redundancy).

  On 2/5/2021 at 1:33 PM, Burgaud said:

After several modifications to scripts, I end up with several #include that I am not sure still in use.

Expand  

Moreover, the usage is not purely pedantic;  the logic for a tool designed to root out just duplicative includes instead of extraneous includes could diverge greatly; namely the in the former case one could merely scan #include statements and without further investigation into their contents, be determinative.

Penultimately, and by way of an excuse, I would like to note that in my original post, the word superfluous was intentionally emphasized.

  On 2/5/2021 at 4:33 PM, JockoDundee said:

Yes, but does it produce a list of superfluous #includes?

Expand  

And as is evident, the language mirrors your statement in my rejoinder, clearly intending to make the distinction between the two adjectives (to which you very astutely were aware of, at least on some level )

  On 2/5/2021 at 3:09 PM, RTFC said:

CodeScanner will produce a list of redundant #includes.

Expand  

Finally, and IMHO, when we are presented with such clues, we should do our best to indulge our conversational partner by striving to look for their intended meaning with an earnest effort; and avoid the temptation of issuing a reflexively puerile response.

Edited by JockoDundee
My parenthetical ending above “some level)” caused an emoticon to be inadvertently created, so I added a space before the paren.

Code hard, but don’t hard code...

Posted (edited)

https://www.google.com/search?q=redundant&ie=UTF-8&oe=UTF-8&hl=en-us&client=safari

Honestly I’m tired of reading your mindless drivel.  You know what he meant as did we all but you like to misconstrue stuff in your twisted views  that you may think is logic. Please stop

 

adjective
  1. not or no longer needed or useful; superfluous.
    "many of the old skills had become redundant"
Edited by Earthshine

My resources are limited. You must ask the right questions

 

  • Developers
Posted
  On 2/12/2021 at 9:05 AM, Earthshine said:

Honestly I’m tired of reading your mindless drivel.  

Expand  

Just hit the ignore button when you feel he's making stupid remarks!  (so guess you don't need to react often ;) ) 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
  On 2/12/2021 at 9:05 AM, Earthshine said:

Honestly I’m tired of reading your mindless drivel.

Expand  

Honestly, I believe you, it can’t be fun.
For others not aware, here is the most recent “mindless drivel”, (posted yesterday) that Earthshine may have found especially “tiring to read”, in response to him steadfastly insisting that fast boot times are more attributable to faster CPU’s than the use of SSD’s.  

 

 

Code hard, but don’t hard code...

  • Moderators
Posted

JockoDundee & Earthshine,

Enough. If you want to continue then do so by PM. Any more posts like those above in open forum and you will both find it hard to post at all for a while.

All clear?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...