home | news | discuss | issues | license LURE: STYLE |
|
---|---|
tim@menzies.us Why | Install | What | Guide | Style If you are reading my code, it will save you time to know how I write my Lua. ExecutionAlways use In the shell environment, always have
Always have data files in `$Lure/data'. Always have
FormattingIndents = 2 spaces (no tabs). Short variable names; e.g. not Join all lines that are only
Module names should be upper case (that's my goal, and that convention is sweeping out through my code). E.g.
Test suitesThe file
DocumentationAdd documents to enable
Some rules:
Separate functions with lines:
DirectoriesAll files in the same directory. All data in "/data" underneath some path name mentioned on PrintingAll files use EncapsulationModule-based polytheism
Temptations (to avoid)No use of meta tables (that way, madness lies). No OO tricks:
ConfigurationGlobal configuration options stored in
|
require "show"
|
Legal
LURE, Copyright (c) 2017, Tim Menzies Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|