-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Researching various API nits to see if I can find a compelling majority. (Feel free to comment/add).
Conventions
Intervals expressed as start/count?
Currently I use start/count because it's unambiguous wrt. if the 'end' is inclusive/exclusive.
insertRows(startRow: number, numRows: number);- Excel does the same.
- Math.js uses inclusive start / exclusive end.
- Most modern JavaScript APIs use start / end (exclusive).
Points, intervals, etc. are open-coded as numbers (as opposed to arrays, objects, etc.)
This was done out of fear of hidden array/object allocations, but never verified.
read(rowStart: number, colStart: number, rowCount: number, colCount: number);Vector, Matrix, etc. are distinct types.
Related to the above, if we were to pass coordinates/sizes as arrays, we could generalize vectors, matrices, etc. to n-dimensional arrays.
Naming
'col' as an abbreviation for column?
insertCol(col: number, numCols: number);'numRows' as an abbreviation for 'number of rows'?
Metadata
Metadata
Assignees
Labels
No labels