-
-
Notifications
You must be signed in to change notification settings - Fork 1
Coding Conventions
There are a few conventions used internally for compiler development and tacitly endorsed for community usage. Some of these are quite unique and may seem foreign or strange.
LM is designed from the ground up to work well with diff based version control mechanisms such as git
.
A Library Card System is a community development coordination system where each file is only permitted to be checked out by N users at a time.
This helps prevent merge conflicts and coordinate development that occurs over shared code fragments.
An Index is a normal header file that contains only import
statements.
An Index can be used to group functionality into "packages" despite packages not being an explicit language feature in LM.
Examples of Indexes in the compiler would be LIB/default.lm
or LIB/default-minimal.lm
.
A Unit File is an LM program fragment that defines an individual globally bound term such as a function. If each function definition is given its own separate file then diff version control may work better than otherwise. Proper usage of both the Library Card System and Unit Files will prevent 100% of merge conflicts.
LM Core is for compiling code. LM Core is not for enforcing coding standards. There is a plugin system in LM to add additional lint steps; please use these, but don't ask for your convention to become core. If it doesn't affect the meaning of code, then it doesn't belong in core.
Verbs should not be conjugated for function and method names: sort
instead of sorted
.
The λ☶ source code and documentation are released under the terms of the attached permissive MIT license. This license is intended only to protect the future development of the project while otherwise allowing people to use the code and IP as they would like. Please, just be nice.