Talk:LSL Style Guide
Script Structure
Mandating event order seems a little retentive to me. I don't think any scripter who is going to post code onto the wiki is going to be keen on rewriting their code to fit the pattern. Being flexible to other scripters styles is a key to success (especially with regards to collaborative projects). They should be grouped in a fashion that makes sense to the script and scripter. Seeing as this section is going to be a hot topic, maybe it shouldn't be included or make it very short? Strife Onizuka 22:29, 14 February 2007 (PST)
- I agree that mandating event order would be a pain in the ass.
- I personally put events in the order they're first used throughout the process of a script's life cycle.
- If a Resident is learning to script from a mentor or teacher, they're likely to be using snippets of code they're sent in-world. For them to see a different structure in LSL Library code would be confusing
- SignpostMarv Martin 05:44, 15 February 2007 (PST)
Re: General Guidelines
Would suggest that the virtues of the second style shown be amended. Saving space is a pointless exercise if LSL code is truly compiled rather than interpreted. The overhead needed to compile a few extra carriage returns has to be trivial in all but the most monumentally huge scripts.
Second virtue of the "parallel brackets" style (the second type shown) is that the nesting of logical modules is far more clear, and is effectively a form of self-documentation that is often more effective than text comments, especially when code is likely to be rewritten, revised or adapted to another purpose by individuals other than the original author. It can even help the original author understand her own code better, faster, if she is returning to a bit of code written in the relatively dim past.
Would take a shot at saying this more concisely, but first want to see if there are other views that should also be reflected in any revision to the text.
This is my first contribution here. Please forgive any unintentional breeches of protocol and ettiquette. --Azadine Umarov 17:49, 7 May 2007 (PDT)