This repository was archived by the owner on Jun 11, 2026. It is now read-only.
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'?
Excel uses 'rowCount', which is probably easier to discover in Intellisense.
Math.js has a single '.size' property that returns a [number, number].
ndarray has a single '.shape' property that returns a 'number[]'.
Reactions are currently unavailable
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.
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.
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?
'numRows' as an abbreviation for 'number of rows'?
[number, number].