Use and Documentation of -> and =>

Newbie here.

-> and => are not in the punctuation list of the Julia documentation. Can they be added or are they not applicable for some reason?

I have gathered that -> is used to define anonymous functions and => is used to define key-value pairs in dictionaries. Are there other applications I am missing?

6 Likes

That’s exactly it! They should definitely be added.

5 Likes

Is there something I should do to facilitate their addition?

1 Like

Making a PR would be best.

I don’t know what that is.

A pull request, ie explicitly making the desired change to the documentation. See

2 Likes

While I think the link @Tamas_Papp has pointed is worth reading. I would like to be a little more specific and less overwhelming, and just point that for documentation, you can just be logged into your Github account, go to julia/punctuation.md at master · JuliaLang/julia · GitHub and click the small pencil that has a hovertext of “Fork this project and edit the file”. After this you will be making the changes in your version of the julia repository, and there will be a button somewhere to do a pull request, that is kinda of offering the changes you made in your fork (i.e., copy of the repository) to the original repository you forked. The Julia developers will be notified, they may ask some changes (that you can do by editing the file in your fork by the Github interface) and then they will aprove it and it will be merged to the original/official Julia repository.

8 Likes

Well I tried. Add arrows to the punctuation list. by nathanrboyer · Pull Request #35990 · JuliaLang/julia · GitHub

I don’t know if I used the right formatting or language though.

8 Likes