Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2131 closed Feature Request (Rejected)

A new #include directive to load a script but not run it.

Reported by: Koder <rick2000@…> Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: #include Cc:

Description

This directive would be used in the main script to include any other script. It would be used to load the functions and other global variable definitions within a script, but it would not execute that script at load time.

Possible names:

#include-norun    <myscript.au3>
#include-load     <myscript.au3>
#include-loadonly <myscript.au3>
#include-resource <myscript.au3>

This include directive would allow any script to become a resource. It would also reduce the chance of executing unintentional code, like debug/testing code within an included file.

Obfuscator may need be updated to recognize the new include directive and strip executable code before joining with the main script.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Valik

  • Resolution set to Rejected
  • Status changed from new to closed

Write good code from the start and you will have no issues with the current #include implementation.

Rejected.

comment:2 Changed 8 years ago by Koder <rick2000@…>

Fair enough, implementing this change could be difficult with large upfront costs and small initial payback. But it's not really a code quality issue, not directly anyway. It's about re-usability and sharing of code from multiple sources. And, the directive could reduce the number of instances of any particular function, since that function could be referenced from any script, rather than copying it. I already compile many functions into UDF scripts, but I also test other scripts from users that do not share my attention to coding standards.

It just occurs to me that I could write my own pre-processor, like Tidy or Obfuscator, and get similar functionality... [minor] problem [almost] solved :)

Anyway, thank you for the consideration, I appreciate the work you guys do.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.