DUELink Coding Standards

It looks like my standalone DUELink script application will be about 300 lines.

Because of the limited scope variable naming convention, I have been adding lots of comments to the code so someone else could read the script and understand what is happening. Also, I have added notes as comments.

I have also added blank lines and indentations, using tabs, to pretty up the code and improve readability.

Given the interpretive execution of the language, will the generous use of comments and whitespace have a significant impact on execution speed?

It will have and impact but shouldn’t be very bad. I am glad you are pushing the engine to the limits. I don’t think anyone has gone this far yet, not even internally.

When I have the script working, I might write a little program to strip the white space and comments and produce a compact script. I will wait to see if the verbose format has a performance issue.

A bigger project would be a pre-processor for scripts. Aside from stripping whitespace and comments, it could convert longer variable names into the compliant names.

1 Like