-
Notifications
You must be signed in to change notification settings - Fork 2
/
STYLE
40 lines (28 loc) · 1.15 KB
/
STYLE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
This document describes style conventions for CLEM.
Cyrus Harmon
Sat Dec 16 15:17:39 2006
================================================
Tiered interfaces
It is becoming clear to me that we need something of a tiered set of
interfaces for CLEM. The highest level interface would be what users
of CLEM would be expected to use. It is perhaps worth considering
making a special package for these symbols. Alternatively, we could
export only this layer. However, it's likely that we will want to
export both high- and lower-level symbols, and to keep them separate,
we might consider placing them in multiple packages.
================================================
High-level functions
* m+
* m-
================================================
Destructive vs. non-destructive functions
Currently we have functions like mat-log and mat-log! where mat-log is
the non-destructive version that returns its results in a newly consed
matrix while mat-log! takes the log of the elements of the matrix in
place and returns that matrix.
alternatives:
1. !
mat-log vs. mat-log! (scheme-style)
mat-log vs. nmat-log (lisp-style)
(mat-log :in-place t)
(mat-log :copy nil)