Open keilmillerjr opened 4 years ago
It would be a good idea in my opinion to include a good boilerplate with all callbacks defined, basic modules loaded flw, flh defined for beginners. I even copy and paste the basics instead of repeatedly writing the same over and over again when I do test layouts. If we go with versioning and auto-update a well defined and standardized versioning convention should be included as well.
Searching for good conventions that a few of us can use to keep consistency and readability. There is no perfect solution. However, settling on a particular convention will make things easier. Below are some ideas. Let me know what you guys think. Is one method better than another? Can edit this post appropriately based on feedback. I am new with git, and will need help with this section.
This issue is a WIP.
Coding Squirrel
Some links for consideration:
File Specifications
LF line endings will be used. It is supported by UNIX (Linux and Mac OS X), as well as properly viewable/editable within notepad on Windows 10 1809+ (only took 33 years!). If your editor does not support changing line endings, use endlines. I created an AUR package of endlines for Arch Linux users.
Comments
Statements
Squirrel 3.0 Reference Manual - Statements
Spaces
Indentations
Spaces retain presentation across screens. Tabs conserve file size and allow your code editor to handle presentation preference. We will use tabs instead of spaces.
Blocks
Blocks in squirrel are indicated by use of curly braces. The preceding curly brace may be placed on the same line (conserving file size), or the following line by itself (visually lining up with proceeding brace). The latter would match the style seen with C in this repository and should be used.
Variable Names
Tables
In squirrel 3.0, it is possible to declare tables using the JSON syntax. The advantage to using the JSON syntax is the ability for spaces to exist within keys. Usage is necessary when generating data from an external source. For consistency, the JSON syntax should be used for tables.
Function/Method Names
Access Modifiers
Squirrel does not have any mechanism to restrict access to functions or variables. However, we can use python naming conventions to help differentiate how they should be used. This is useful to give a clear indication of how to use and extend a class. I don't really see a need for private access.
Full Example
Git
Git/GitHub branching standards & conventions