On Sun, Feb 22, 2009 at 9:47 PM, <pugs-comm...@feather.perl6.nl> wrote:
> Added: docs/Perl6/Spec/S28-special-variables.pod > =================================================================== > +=head2 Named variables (see S02): > + $?OS # operating system compiled for > + $*OS # operating system running under > + $?OSVER # operating system version compiled for > + $*OSVER # operating system version running under How are you possibly going to get this in a remotely portable basis? How could an implementation handle the case of compiling a perl6 script down to native binary? Would the native binary always report the same OS and OSVER no matter where it executes after turned into a binary? > > + $?PACKAGE # current package (as object) > + @?PACKAGE # current packages > + $?PACKAGENAME # name of current package (see S10) $?PACKAGENAME seems kind of redundant when I could similarly do a $?PACKAGE.perl to get a coderef back as well. In fact, all of the variables that are named version of the coderef version should probably be removed in the favor of something like ~$?FOO or ~$*FOO. > > + $*PROGRAM_NAME # name of the program being executed > How does this differ from $*EXECUTABLE_NAME? > + $?PUGS_VERSION # Pugs version (not canonical) > + $*PUGS_HAS_HSPLUGINS # True if Pugs was compiled with support for > hsplugins > + # (not canonical) How do these apply to anything other than a single specific implementation? What motivation would Rakudo or elf have for defining these? > + &?ROUTINE # current sub or method (itself, see S06) > + @?ROUTINE # current subs or methods (themselves) > I'm sure this is a typo for $?ROUTINE. Besides, I think $?SUB makes more sense. > + > + $*OSNAME ...or some such > + $^O $OSNAME > + Doesn't correlate with the list above. > + > + $* and $# have been deprecated half of forever and are gone. $[ > + is a fossil that I suppose could turn into an evil pragma, if we > + try to translate it at all. (Frees up * twigil for $*FOO syntax.) I'm not even sure this makes sense to me. Is this saying that $* and $# are largely not in use anymore (in perl6)? -Jason "s1n" Switzer