Re:Perl 6 hands-on tutorial – A small introduction to a big ...
by logicallee on Friday September 04, 2015 @06:57PM
(#10173221)
hi - my complaint was over the choice of specifically the word WHAT (and not a different word), and in capitals.
1 is an integer. In Perl 6 integers are objects and have methods. The method calls are distinguished by periods, as has become the most common way to call methods in programming languages.
Is your main complaint that it just looks weird? Is there something you would expect it to be other than a method on an integer or numeric type? Personally, while yes, it does look somewhat weird, the uniformity of knowing you can call .WHAT on anything is nice.
You get one guess as to what 1.23.WHAT does.