Page 1 of 1

CodingConventions for XYscripts?

Posted: 23 Apr 2009 15:01
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.

Re: CodingConventions for XYscripts?

Posted: 23 Apr 2009 22:36
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