Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention 「my %h{Int}」 syntax when talking about non-string keys #1588

Closed
AlexDaniel opened this issue Oct 5, 2017 · 5 comments
Closed
Labels
docs Documentation issue (primary issue type)

Comments

@AlexDaniel
Copy link
Member

See https://docs.perl6.org/type/Hash#Non-string_keys

There's a little useful hint on https://docs.perl6.org/type/Hash#method_keyof:

my %h2{Str} = 'oranges' => 7;            # (keys must be of type Str)

But it's hard to find it from “Non-string keys” section.

@AlexDaniel AlexDaniel added the docs Documentation issue (primary issue type) label Oct 5, 2017
@BenGoldberg1
Copy link

It might also be worthwhile to also mention hashes with no restriction on keys my %h3{Any};

@tisonkun
Copy link
Member

I think this mention some of it: https://docs.perl6.org/type/Hash#Object_hashes_and_type_constraints
while it gets a wrong hierarchy in the doc -- it is below `Looping over hash keys and values'

@tisonkun
Copy link
Member

@AlexDaniel #1602 may fix it, and this issue can be closed

@AlexDaniel
Copy link
Member Author

I think it is a bit convoluted and hard to read, but indeed this issue is resolved. I'll leave this open for just a little bit in case someone has any thoughts on how to reword it so that it reads better, but otherwise this can be closed.

@tisonkun
Copy link
Member

tisonkun commented Nov 4, 2017

@AlexDaniel Yes, maybe it can be rewritten using more simple examples.

@JJ JJ closed this as completed in b6002e8 May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

3 participants