Consistency of style is especially important in Lucy because multiple programming languages are involved. Virtually no contributors are likely to be equally fluent in all of them, and it is easier for those who are less fluent in a given language to comprehend code that adheres to a single style.

Contributions should conform to the following set of guidelines. Individual guidelines may be broken if necessary to achieve a clearer layout, though the auto-formatters impose certain constraints.

All Languages

C

Perl

All code should follow perlstyle.

Formatting is handled automatically using Perltidy with a perltidyrc file derived from the guidelines laid out in Damian Conway's book 'Perl Best Practices'.

Ruby

All code should follow the guidelines set out here (defunct domain):

Spaces should be used for indentation. Curly braces should be used for one-line blocks, do ... end for multi-line blocks.

File naming should follow these conventions:

All code should be wrapped in the Lucy module. Public methods should include rdoc comments.

LucyStyleGuide (last edited 2013-02-15 22:43:01 by Kurt Starsinic)