I wrote:
   class Example
   {
      my %private_data;
      my sub source {...};

      has %.data;

      has &.blahh = { %.data<blahh> };

Should read $.blahh, &. would indicate codehood.


      # and how about syntactic sugar for this:
      has &.blubber from %.data;

Here also $.blubber. Sorry, that I got the sigil typing wrong.
But I was to much thinking in terms of code implementing slots
then the type of the slot under definition.

      # private slot
      has &.hidden from %private_data is rw;
      has $.hidden := &.hidden;

This also is actually too verbose. Should be condensed to:
has $.hidden is rw from %private_data;

BTW, I would like to coin the term 'onboard method' for a
code slot of type Method.


      # initialized from class
      has $.cache is rw from source;

      # virtual per instance
      has $.value from {...};
   }
--
TSa (Thomas Sandlaß)


Reply via email to