a question on use and . in class declarations

A question on the "use" in a class declaration.

In "use $.x". does the dot have a special meaning or is it just to make the value ($.x) easier to access ($objectname.x)?

Many thanks,
-T
0
perl6
12/31/2020 1:41:42 AM
📁 perl.perl6.users
📃 1547 articles.
⭐ 0 followers.

💬 1 Replies
👁️‍🗨️ 15 Views

From my in progress notes on OOP:

*** addressing values inside an object ***

The dot itself is technically an operator, it means "call the method 'apples' on the preceding object".  

So $FruitStand.apples translates to "call the method 'apples' on the object $FruitStand".
0
perl6
12/31/2020 6:24:14 AM
Reply:
(Thread closed)