cogciprocate / bismit

bismit - Biologically Inspired Sensory Motor Inference Toolkit
GNU General Public License v2.0
5 stars 0 forks source link

Style and Conventions #1

Open c0gent opened 9 years ago

c0gent commented 9 years ago

Expound on code style and library related conventions.

c0gent commented 9 years ago

CONVENTIONS


idx: current index (of a loop, workgroup, queue, etc.)

idz := index[0], first element, starting element

idz_parent: first element within the subset of a parent group

idn := index[len]: element after final element, termination point

idm := index[max] := index[len - 1]: final (valid) element just before idn. idn - 1 = idm.

id: identifier, but not a physical array index

id_parent: identifier within the subset of a parent group

***** High Priority Comment, Temporary Code Change
<<<<< Medium Priority Comment, To Do
##### Debug Message Prefix
c0gent commented 9 years ago

Elaborate on fully expanded function definition style. ex:

pub fn my_function(
    &mut self, 
    important_param: u8,
    awesome_thing: AwesomeThing,
    //old_thing: Vec<OldStuff>,
    optional_thing: Option<usize>,
) -> ReturnedThing {
    ...
}

All lines are easily comment-out-able.