Skip to content

Conversation

@1pakch
Copy link

@1pakch 1pakch commented Feb 15, 2018

Makes it easier to find the syntax used for typing anonymous functions which is not mentioned explicitly in the Getting Started guide and is impossible to find by searching for "function types".

I would update the guide as well by adding a paragraph mentioning function types and providing an example.

1pakch and others added 2 commits February 15, 2018 18:25
Makes it easier to find the syntax used for typing anonymous functions
which is not mentioned explicitly in the Getting Started guide and is
impossible to find by searching for "function types"

[ci skip]
@josevalim
Copy link
Member

@ilya-kolpakov I have pushed a commit to move this to literals and then I realized that we do mention those. That said, I don't think we should move them to separate section because they are literals after all. For example, should we move maps to a separate section because folks cannot find them?

If the issue is discovery, then we can find ways to improve it, but organization wise this is correct. Thank you.

@josevalim josevalim closed this Feb 15, 2018
Copy link
Contributor

@umamaistempo umamaistempo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this change is meaningful as they already exists in literals

@1pakch
Copy link
Author

1pakch commented Feb 15, 2018

Discovery is indeed the issue. I spent quite some time trying to figure this out and did not find what the syntax was until I posted on Elixir forum even if I had the right page open in the browser. If I google "typespecs function types" I do not get anything pointing at the right syntax.

I see your point if this documentation is targeted for developers. I would say it is probably quite difficult for elixir devs to imagine the experience of someone quite new to the language, so please do not underestimate that gap.

EDIT: I think it is preferable to have this syntax next to "function types" (or "function types" and "typespecs") together so it would be easier to find. I think "anonymous functions" does not do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants