Julia: Use of 梅 in the manual

Created on 6 Mar 2017  路  6Comments  路  Source: JuliaLang/julia

Originally https://github.com/JuliaLang/JuliaDoc/issues/25

In http://docs.julialang.org/en/latest/manual/strings.html it shows this example:

julia> str[end梅2]
' ': ASCII/Unicode U+0020 (category Zs: Separator, space)

But the meaning of the '梅' symbol is not explained. I'm guessing that it is a division operator but then why not use '/' ? So I think some explanation is appropriate.

I agree that this is a bit unclear. I think we should generally prefer the ASCII versions of the functions in the manual, as they are easier to search for.

We could alternatively (or also) have a parenthetical link "(here is the quotient from integer division)"

doc

Most helpful comment

I think we should generally prefer the ASCII versions of the functions in the manual, as they are easier to search for.

That mainly means the search function is broken. FWIW being non-ascii should be much easier to return the correct result than div.

All 6 comments

I think we should generally prefer the ASCII versions of the functions in the manual, as they are easier to search for.

That mainly means the search function is broken. FWIW being non-ascii should be much easier to return the correct result than div.

Not only that: to search for I have to select it, copy and paste. To search for div I can just type 3 letters.

Not that it helps much overall, but Mac users can do option+/ to get .

Well, that's mainly a reason to improve the tooling. Many doc tools out there (doxygen for example) can generate reference links automatically and we should be able to do the same in code blocks too. Even simpler (less smart) solution would be to generate search link automatically (similar to how the quote link is generated automatically on text selection in discourse).

OTOH, I've seen many people (me included......) who have used div for months without realizing (or even think about looking for) a shorter/operator version of it. IMHO, finding function when you already know the operator version is generally easier (especially for div since that's the function name being printed) than finding the operator/unicode version from the function name. The problem for the latter is that many people don't even think about looking for the operator (that's certainly why I didn't know it's existance for a few month.).

Oh, forgot to say that this is why I think we should encourage using of in the doc as long as we make it easy to search.

(In the REPL/IJulia, or in Emacs/vim/Atom/... with appropriate plugins, you can type \div<TAB> to get . This should probably be mentioned in the docstring for div. But this doesn't help with search unless we implement Unicode tab-completion there too.)

Was this page helpful?
0 / 5 - 0 ratings