CodingConventions for XYscripts?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply

Do we need CodingConventions for scripts

Yes
3
100%
No
0
No votes
Unsure
0
No votes
 
Total votes: 3

fishgod
Posts: 231
Joined: 03 Feb 2008 00:40
Location: Sankt Augustin (near Bonn), Germany

CodingConventions for XYscripts?

Post by fishgod »

I think we should have some CodingConventions.

There is a huge collection of nice scripts here in the forum and the possibility to use parts of other scripts by simply launching them gets bigger every day.
But there are also problems comming along:
e.g. global var-names used by both scripts,
temp-files,
...

Thats the point where conventions should be used, so that every script uses a unique prefix in global variables. Temp/config-files should be stored at a specified place, internal and external-labels could have a defined prefix, ... may there be much more I haven't thought about yet.

I hope you scripting-folks agree that the idea of conventions is basically a good one, but its up to us to decide what we want and what we need.


Please give at least a quick feedback whats your opinion on my thougths when voting the poll.
Operating System: Win10 x64 / Win11 x64 / almost allways newest XY-beta
totally XYscripting-addicted

RalphM
Posts: 2089
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: CodingConventions for XYscripts?

Post by RalphM »

Even though I agree completely and therefore voted yes, I doubt we can prevent incompatibilities of scripts from various authors simply by setting coding up conventions.
Especially when it comes to global vars, where two beautiful minds might easily come up with the same beautiful name for a var.
The only help for that matter is a good documentation for the scripts, and all coders know that's a hard and time consuming job.
So I'm not sure, whether too much regulations on how a script should look like wouldn't actually fear people off from publishing their scripts.
While it might be an easy job to write a quick and dirty (or even a more sophisticated) script for personal usage, it's a completely different thing to follow regulations in order to make it usable for everybody.

Furthermore I think, if we want to use conventions, it's probably the easiest way to adapt existing ones of another scripting language, rather than to start from scratch.

Just my .02
Ralph :)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)

Post Reply