How do you call the variable types?

2017-06-09 Thread Gabor Szabo
Looking at https://docs.perl6.org/language/variables there are 4 variable types with sigil: $, @, %, &. In Perl 5 I used to call them scalar, array, hash, and function respectively, even if the scalar variable had a reference to an array in it. How do you call them in Perl 6? As I understand @

Re: How do you call the variable types?

2017-06-09 Thread Richard Hainsworth
It also seems to me that 'scalar' gives the wrong impression compared to arrays. A scalar in a vector is a component of a vector. I was thinking of "generic". Hence "$variable" is a generic variable because it can hold any type of content. On Friday, June 09, 2017 02:10 PM, Gabor Szabo

Re: How do you call the variable types?

2017-06-09 Thread Brad Gilbert
@ does the Positional role % does Associative & does Callable $ causes its value to be an item (its values do not flatten into an outer list when you use `flat`) my %hash is SetHash; Array does Positional, and all of its values are itemized We are unlikely to call $ variables "generic"

Re: How do you call the variable types?

2017-06-09 Thread Gabor Szabo
Brad, thanks for your reply. I accept your point on not calling $-variables "generic variables", but then how do you call them? The same with the other 3. You described what they do in the same way as the documentation does, but when you casually speak about them, you know, with friends in bar