develooper Front page | perl.perl5.porters | Postings from September 2011

Re: Reordering perlvar

Thread Previous | Thread Next
From:
Abigail
Date:
September 26, 2011 16:44
Subject:
Re: Reordering perlvar
Message ID:
20110926234416.GB5626@almanda
On Mon, Sep 26, 2011 at 01:38:47PM -0600, Tom Christiansen wrote:
> Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote
>    on Mon, 26 Sep 2011 14:14:27 EDT: 
> 
> >* Tom Christiansen <tchrist@perl.com> [2011-09-26T12:51:37]
> >> In that case, why don't we just randomize everything?  Certainly
> >> perlfunc could use some useful randomizing in the same way.
> 
> > My pager can search by strings, meaning organizing sections by the
> > header's spelling gets me nothing.
> 
> > My pager cannot group them by topic, the version in which we added
> > them, or quite a few other properties.  Picking one or more of those
> > to use for organizing actually has benefits.
> 
> > I find the idea that anyone would be paging through perlvar trying to
> > find things in dictionary order to be hard to swallow.  "Oops, I paged
> > past the P's, I'll have to go back a few pages..."
> 
> Really?  Hm.  I think I may.  
> 
> I feel alphabetized lists are from a user interface point of view.


But most entries in pervar use *punctuation* for their names. How many
people actually know how punctuation sorts? Does $^O sort under 'O'? Or
under \017 (cntr-O)? Or perhaps as \136\117 (carrot O)? Besides, perlvar
also mentions the English names. They sort differently. And should one
consider the sigil when sorting or not?

I really think it's in the users benefit to put, say C<< $' >> and
C<< ${^POSTMATCH} >> next to each other, and C<< $` >>, C<< $& >>,
C<< ${^PREMATCH} >>, and C<< ${^MATCH} >> nearby, instead of

  $&
  $'
  ... others like $(, $), $+, $., ...
  $`
  ... others like $;, $<, $=, $>, ...
  ${^MATCH}
  ${^POSTMATCH}
  ${^PREMATCH}


Or maybe ${^MATCH} should follow $^, or follow $^M.


I'd say alphabetic order makes sense in a lot of cases. For punctuation,
less so. And sorting using their English names is useless, IMO. In my
experience "real code" uses English.pm about as frequently as formats
(that is, only code written on during full moons on leap days that are
Fridays under the guidance of the pope himself uses it). If people need
to look up the meaning of variables in code they encounter, it's far more
likely the variable is a punctuation variable than one that's completely
written in ASCII letters.


To sum up, I don't think there's much benefit in keeping alphabetical
order in perlvar.



Abigail

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About