diff options
author | 2006-05-23 21:51:59 +0000 | |
---|---|---|
committer | 2006-05-23 21:51:59 +0000 | |
commit | e24d8149c3aefd11b03458b6f9b3e38ca454b07a (patch) | |
tree | 7c66dda6b63ea0c1f3e6e03259ef0b1609aca8b6 /dev/doc/style.txt | |
parent | b65fd67d6210f480eed759d58422ca8c4da95eab (diff) |
Restructuration dossier dev et mise à jour de certaines documentations
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8856 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'dev/doc/style.txt')
-rw-r--r-- | dev/doc/style.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dev/doc/style.txt b/dev/doc/style.txt new file mode 100644 index 000000000..2e597dc45 --- /dev/null +++ b/dev/doc/style.txt @@ -0,0 +1,49 @@ + +<< L'uniformité du style est plus importante que le style lui-même. >> +(Kernigan & Pike, The Practice of Programming) + +Mode Emacs +========== + Tuareg, que l'on trouve ici : http://www.prism.uvsq.fr/~acohen/tuareg/ + + avec le réglage suivant : (setq tuareg-in-indent 2) + +Types récursifs et filtrages +============================ + Une barre de séparation y compris sur le premier constructeur + +type t = + | A + | B of machin + +match expr with + | A -> ... + | B x -> ... + + +Conditionnelles +=============== + if condition then + premier-cas + else + deuxieme-cas + + Si effets de bord dans les branches, utilisez begin ... end et non des + parenthèses i.e. + + if condition then begin + instr1; + instr2 + end else begin + instr3; + instr4 + end + + Si la première branche lève une exception, évitez le else i.e. + + if condition then if condition then error "machin"; + error "machin" -----> suite + else + suite + + |