in reply to Re^2: Psychic Disconnect and Object Systems
in thread Psychic Disconnect and Object Systems
Attributes are per-object.
If an instance attribute is to ever have any value, then it is at best: write-once.
And it is conceivable that a factory constructor could derive from different base classes to provide different constant attributes.
Constants are per-process.
Actually, Perl's constants are per-package rather than per process. And it certainly isn't inconceivable that they could be implemented to be block scoped as many of the newer pragmas are.
And as I understand it, it would be completely possible to have per-instance constants with Perl 6 using Roles. Maybe even in Perl 5 with Perl6::Roles
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Psychic Disconnect and Object Systems
by ikegami (Patriarch) on Apr 16, 2011 at 00:14 UTC | |
by BrowserUk (Patriarch) on Apr 16, 2011 at 01:09 UTC | |
by ikegami (Patriarch) on Apr 16, 2011 at 16:09 UTC | |
by BrowserUk (Patriarch) on Apr 16, 2011 at 18:45 UTC | |
by ikegami (Patriarch) on Apr 16, 2011 at 19:51 UTC | |
| |
by John M. Dlugosz (Monsignor) on Apr 18, 2011 at 02:00 UTC | |
by ikegami (Patriarch) on Apr 18, 2011 at 02:06 UTC | |
by John M. Dlugosz (Monsignor) on Apr 18, 2011 at 18:24 UTC | |
by ikegami (Patriarch) on Apr 18, 2011 at 18:27 UTC |