The following is a set of guidelines for proposing changes to the OCaml distribution. These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document itself in a pull request.
Owl is currently under acive maintaining. Besides coding, there are many other ways you can contribute. Bug reporting, typo fix, asking/answering questions, and improvement of existing documents are all well appriciated.
Generally we follow the coding style specified in this file: http://www.cs.cornell.edu/courses/cs3110/2011sp/Handouts/style.htm
A few more points:
- When using patterns,
- format the code a bit by making two "->" aligned,
- use the first default
|
explicitly, and - the
None
condition should come afterSome
condition. For example:
match l with
| Some list -> List.map float_of_int list
| None -> []
- Do not have line longer than 80 columns.
- Use spaces rather than tab.
-
utop
provides a convenient environment for playing withOwl
. However, a piece of code running correctly inutop
doesn't always mean that it is error-free. Compile the code and run.native
. -
With the
zoo
system finished, you can test an example script withowl
command. -
make
your code base locally before the PR to ensure no compilation errors. -
If you want to improve a current example of
owl
, make sure its perforamce is no worse than the original one. -
That being said, you are encouraged to use the
zoo
system to share any code snippets inowl
. -
Keep corner cases in mind. For example, does your code also work for complex +numbers?
- Make sure the grammar is correct.