|
Re: analogy pmc/content with inode/file: msg#00563lang.perl.perl6.internals
At 12:06 PM +0200 10/27/04, Leopold Toetsch wrote: Stéphane Payrard <stef@xxxxxxxxxxx> wrote: Not quite. The PMC is the variable, not the value. The contents of the PMC are the value. It depends on the HLL, what e.g. an These aren't all assignment, and the chosen punctuation is really unfortunate. i = j # Python - both variables refer to the same value This isn't assignment. This is name rebinding -- that is, two names in some namespace refer to the same PMC i += k # mutable objects are changed in place This is one of those bizarre mutant cases -- it's really a method call. @a = @b # Perl - copy array This is assignment, sort of. If you squint hard, given the stuff perl's doing behind the scenes. In all these it's important to note that in most languages (certainly the ones we care about) objects are *reference* types, not value types. That is, there's a level of indirection (likely an ObjectReference or just generic PMCReference PMC) between the name and the ultimate object structure, something we don't do right now. -- Dan --------------------------------------it's like this------------------- Dan Sugalski even samurai dan@xxxxxxxxx have teddy bears and even teddy bears get drunk |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Perl 6 and byte code: 00563, Peter Hickman |
|---|---|
| Next by Date: | Re: Perl 6 and byte code: 00563, Gisle Aas |
| Previous by Thread: | Re: analogy pmc/content with inode/filei: 00563, Leopold Toetsch |
| Next by Thread: | pmc_type: 00563, Nicholas Clark |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |