logo       

analogy pmc/content with inode/file: msg#00538

lang.perl.perl6.internals

Subject: analogy pmc/content with inode/file

I want to make an loose analogy between pmc/their_content and
Unix inodes/files which I use as a mnemonic.

PMCs are the equivalent of inodes, each one
reference some content which is the equivalent of a file.

C<set_pmc>, when the source and the destination pmcs are of the same type,
is like creating a hard_link to a file. The two pmcs share the
same content.

C<set_pmc>, when the destination pmc is a reference, is like
creating a symbolic link with the difference that there cannot
dangling reference pmc thanks to reference counting.

C<assign_pmc> is like copying a file to another. After the
assignement the two pmcs and their contents are independant.

Does the analogy holds? or am I mistaken?
I certainly don't pretend that one can carry further the analogy.

--
stef



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise