Question: use of _self:- inside object constructor proc vs. another object proc

I noticed in object constructor I had to write  _self:-name  to refer to object own variable called name.  But inside a another proc I can use just name without having to add _self:- to it. It also works when adding _self:-

Is this becuase constructor is special proc, and the object is not yet full constructed?  Here is a MWE

    option object;
    local name::string:="";

    export ModuleCopy::static:= proc( _self::person, proto::person, the_name::string, $ ) 
            print("Enter  constructor");
           _self:-name:= the_name;

           #Why this fails here, but not in process proc? Is it because of special
           #case since done inside constructor?

    end proc;
   export process::static :=proc(_self,$)
     #here both cases work
   end proc;

end module;

#and now


The above works. But if I uncomment #print(name); inside the constructor, maple gives error

Error, static procedure `ModuleCopy` refers to non-static local or export `name::string` in surrounding scope

But this works with no error



But no such error when doing same thing inside a local static proc inside same module.

Is this special just for the constructor than one must use :-self ? Just wanted to make sure.

Maple 2022.1

This has been branched into the following page(s):
Please Wait...