You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.genrows() has an unfortunate name. It's supposedly the generalized rows of an array. The reason for the tricky name, was that .rows() was taken - by the row count.
We could rename rows →row_count and genrows → rows to solve this, ideally with deprecations, so in a two version cycle.
rows() is a more natural name for the ndproducer and iterable for rows, for example because the user doesn't have to care that it's “generalized” rows if they only use 2D arrays — they don't need to know and it doesn't matter.
The main problem with the genrows name is that it is non-intuitive to guess to type and guess what it means.
Note that we chose the .rows() name for the row count to match the sprs crate, but I think we can choose to go our own way here, if we have a good reason.
An alternative to the row_count name is nrows() — anyone have a survey of what other crates prefer apart from sprs?
NOTE: The same story applies to gencolumns.
The text was updated successfully, but these errors were encountered:
I agree that .genrows() has an unfortunate name. It's funny, I've always read it as "generate rows" instead of "generalized rows", which confused me because none of the other iterator/producer methods had the gen prefix. .rows() does seem like a better name.
Other crates:
nalgebra: nrows and ncols are the counts. (rows and columns are slicing operations. row_iter and column_iter are the iterators.)
rulinalg: rows and cols are the counts. (row_iter and col_iter are the iterators.)
sprs: rows and cols are the counts.
My preference for the counts is nrows and ncols/ncolumns because these names are clear while being shorter than *_count.
.genrows()
has an unfortunate name. It's supposedly the generalized rows of an array. The reason for the tricky name, was that.rows()
was taken - by the row count.We could rename
rows
→row_count
andgenrows
→rows
to solve this, ideally with deprecations, so in a two version cycle.rows()
is a more natural name for the ndproducer and iterable for rows, for example because the user doesn't have to care that it's “generalized” rows if they only use 2D arrays — they don't need to know and it doesn't matter.The main problem with the
genrows
name is that it is non-intuitive to guess to type and guess what it means.Note that we chose the
.rows()
name for the row count to match the sprs crate, but I think we can choose to go our own way here, if we have a good reason.An alternative to the
row_count
name isnrows()
— anyone have a survey of what other crates prefer apart from sprs?NOTE: The same story applies to
gencolumns
.The text was updated successfully, but these errors were encountered: