denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] Global scheme variables: Naming conventions


From: Richard Shann
Subject: [Denemo-devel] Global scheme variables: Naming conventions
Date: Sat, 21 Nov 2009 10:48:13 +0000

As we now have code to list all the variables defined in scheme at start
up, I propose the following

In denemo.scm
Global variable names (includes procedure names) that are intended for
scripters to use should be formatted LikeThisOne, that is words
capitalized and concatenated. The scheme conventions (e.g. Chord? for a
procedure returning a boolean) are ok - so the main rule is, no initial
lower-case letters or underscores.
A prefix d- indicates a procedure (usally built-in) that is
querying/setting Denemo data. Procedures that are just manipulating
scheme data should not have d- prefix.

In init.scm files in menus
Global variable names should be prefixed with <commandname>::
where <commandname> is the name of (the main) command
creating/manipulating the variable.

The only crucial thing is not to create variables in init.scm which
could get overwritten by other scripts elsewhere, or overwrite things in
people's local versions of denemo.scm

The other rules are just trying to make the code easier to understand,
read etc.

Any suggestions welcome,

Richard






reply via email to

[Prev in Thread] Current Thread [Next in Thread]