Julia: word choice improvements

Created on 7 Aug 2020  Â·  7Comments  Â·  Source: JuliaLang/julia

| suggestion | to replace | | source |
|-------------|--------------|--|------------------|
| | | | |
| namesfrom | names | | @nickrobinson251 |
| phase | angle | | @ExpandingMan |
| streampos | position | | @JeffreySarnoff |
| | | | |
| diagindex | diagind | | @imciner2 |
| nextindex | nextind | | @jakobnissen |
| previndex | prevind | | @zdroid |
| thisindex | thisind | | @jakobnissen |
| | | | |
| valuetype | valtype | | @quinnj |


From time to time people mention similar preferences.
Let's collect the suggestions. I'll copy them into this table.


_moved from discourse_

All 7 comments

As long as we are listing index-related ones: diagindex instead of diagind (or even the full word diagonalindex, but that might be making it too long).

There was also some discussion about "position" being exported for a fairly obscure use case. Also, nextind should be nextindex. And also see #35285

Perhaps names could also be renamed, since it is such a generic word for quite a specific (and i believe rarely used) function. Possible more verbose option: namesfrom

Totally agree on the index changes, it's really weird that we have firstindex, lastindex , but at the same time have prevind,nextind, thisin

Any sp... function is confusing. Maybe zeroes(SparseArray, m, n) instead of spzeroes(m, n)? Not sure if there's an issue open for that already

I think the problem with this was that it's ambiguous with zeros(Int...) where the type is the eltype.

Oh, hmm, well, maybe a SparseElement dummy type then? There must be a nicer syntax then sp

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixrehren picture felixrehren  Â·  3Comments

omus picture omus  Â·  3Comments

StefanKarpinski picture StefanKarpinski  Â·  3Comments

ararslan picture ararslan  Â·  3Comments

sbromberger picture sbromberger  Â·  3Comments