On Fri, 27 Feb 2009, Henry Baragar wrote:

I am starting to get overwhelmed by the number of special names and I am wondering why we need to have a flat naming space?

For example, wouldn't it be easier to remember (and to introspect) the following?

I vote in favour of the general idea, although I disagree with some aspects of this. I think there are many things that could be grouped together, but I think we should be careful not to go too far. Larry wanted to Huffmanise many of these too, hence the great number. I think we could probably reduce the number by maybe 1/3. If I get around to doing this before someone else does, I'll certainly refer to your groupings below for ideas.


  $*SYSTEM.uid
  $*SYSTEM.euid
  $*SYSTEM.pid
  $*SYSTEM.perl
  $*SYSTEM.env
  $*SYSTEM.program_name
  $*SYSTEM.error_handle

  $?COMPILER.vm
  $?COMPILER.svm
  $?COMPILER.perl
  $?COMPILER.parser
  $?COMPILER.setting
  $?COMPILER.os_distro

  $?PROGRAM.scope
  $?PROGRAM.routine
  $?PROGRAM.role
  $?PROGRAM.class

This way we only have a few special names (objects?) that organize everything in this synopsis.

Regards,
Henry




pugs-comm...@feather.perl6.nl wrote:
Author: wayland
Date: 2009-02-25 07:08:52 +0100 (Wed, 25 Feb 2009)
New Revision: 25541

Modified:
   docs/Perl6/Spec/S28-special-names.pod
Log:
S28: Incorporated some more stuff from the old documentation lower down, and a few variables from S02.
Modified: docs/Perl6/Spec/S28-special-names.pod
===================================================================
--- docs/Perl6/Spec/S28-special-names.pod 2009-02-25 05:31:24 UTC (rev 25540) +++ docs/Perl6/Spec/S28-special-names.pod 2009-02-25 06:08:52 UTC (rev 25541)
@@ -50,6 +50,7 @@
  $?CLASS                   # current class (as variable)
  %?CONFIG                  # configuration hash
  $=DATA                    # data block handle (=begin DATA ... =end)
+ $?DISTRO            S02   # Which OS distribution am I compiling under
  $*EGID                    # effective group id
  %*ENV                     # system environment
  $*ERR               S16   # Standard error handle; is an IO object
@@ -71,16 +72,20 @@
  $?OSVER                   # operating system version compiled for
  $*OSVER                   # operating system version running under
  $*OUT               S16   # Standard output handle; is an IO object
+ $?PARSER S02 # Which Perl grammar was used to parse this statement?
  $?PACKAGE                 # current package (as object)
  $?PACKAGENAME       S10   # name of current package
- $?PERLVER                 # perl version compiled for
- $*PERLVER                 # perl version running under
+ $?PERL              S02   # Which Perl am I compiled for?
+ $*PERL                    # perl version running under
  $*PROGRAM_NAME            # name of the program being executed
  $*PID                     # system process id
  ::?ROLE                   # current role (as package name)
  $?ROLE                    # current role (as variable)
  &?ROUTINE           S06   # current sub or method (itself)
+ $?SCOPE             S02   # Current "my" scope
  $*UID                     # system user id
+ $?VM                S02   # Which virtual machine am I compiling under
+ $?XVM S02 # Which virtual machine am I cross-compiling for
  Note that contextual variables such as C<$*OUT> may have more than
 one current definition in the outer dynamic context, in which case
@@ -166,10 +171,11 @@
  $^H                 -              These were only ever internal anyway
  %^H                 -
  -                   $!             Current exception (see L<S04-control>)
- $! $ERRNO $OS_ERROR -              Can get some info from new $!
- $?  $CHILD_ERROR    -
- $@ $EVAL_ERROR - Just throws an exception now (see L<S04-control>)
- $^E                 -
+ $! $ERRNO $OS_ERROR -              Use shiny new $!
+ $?  $CHILD_ERROR    -              Use shiny new $!
+ $@  $EVAL_ERROR     -              Use shiny new $!
+ $^E                 -              Use shiny new $!
+ $^S                 -
  $. $NR              $*IN.input_record_number()
  $/ $RS              $*IN.input_record_separator()
  $|                  $*OUT.autoflush()
@@ -203,14 +209,22 @@
  ARGVOUT             $*ARGVOUT      Another IO object
  @F                  @*INPLACE_AUTOSPLIT_FIELDS   ..or some such
  %ENV                %*ENV
+ ${^OPEN}            -              This was internal; forget it
  =head2 Old stuff for p5/p6 comparison
This section will eventually die, but for now, it contains some old information on which -Perl5 special variables will turn into Perl6 special variables. +Perl5 special variables will turn into Perl6 special variables. The reason they are +retained is either:
 -=over 4
+=over
 +=item * Their status is undecided
+
+=item * They have some commentary on stuff that needs consideration
+
+=back
+
Because a blank entry in either column could be taken to mean either "not in Perl 6" or "unknown", the information as presented below presumes an entry in both columns for every entry. @@ -229,29 +243,25 @@
 Other organizational
 schemes may become appropriate when the table is more complete.
 -=back
-
  ******* XXX the columns seem to have switched! *********
   ?       ${^ENCODING}
+ ?       ${^UNICODE}     Pending S15 Unicode
 -
  -       $^V $PERL_VERSION
  -       $]             version + patchlevel / 1000 of Perl interpreter
                         Replacement for the above two is unclear.
+                        Is this $?PERL?    - -       ${^OPEN}
+ ?       ${^TAINT}      Pending, among other things, infectious trait spec
 - ?       ${^TAINT}
- ?       ${^UNICODE}
-
  -       $^W $WARNING   Probably gone. But we need a reasonably
                         granular way to suppress specific (groups
of) warnings within both lexical and dynamic scopes.
 - ?       $ARGV
+ ? $ARGV Can this be handled with $*IN.name, etc? ? @INC Uncertain but we need a way to add to search path
  ?       %INC        Uncertain but we need a way to add to search path
@@ -259,13 +269,14 @@
  ?       @_
  +This signal handling stuff is pending S16.  +
%*SIG %SIG Or possibly &*ON_SIGINT, etc. But then we'd need to add some signal introspection in another way.
   &*ON_WARN __WARN__
  &*ON_DIE  __DIE__
  &*ON_PARSEERROR
- -       $^S $EXCEPTIONS_BEING_CAUGHT
   XXX Everything below this line is older than everything above it.


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to