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

Re: RFC: Autoloading charnames

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
November 26, 2011 08:00
Subject:
Re: RFC: Autoloading charnames
Message ID:
20111126160007.GB26618@cancer.codesimply.com
* David Golden <xdaveg@gmail.com> [2011-11-22T18:51:35]
> Put differently, we should *NOT* do either of these:
> 
> (a) *say* we autoload charnames on \N{} and then *not* have
> charnames::viacode() be a valid function call after \N{}
> (b) *don't say* anything about charnames, but have
> charnames::viacode() be valid after \N{}

This summarized my feelings very well, too.

I would prefer if \N{} did not cause charnames::viacode (etc) to just start
working.  That is a pretty weak preference, but I prefer that functions like
that have their module loaded explicitly.  \N{}, on the other hand, is (or
ought to be) a much more basic language feature that should always work.

This would require work to provide a way to only load charnames, and not
everything else.  I know that work might not get done right now, and I think
it's more useful to have \N{} Just Work than delay for this small point.

My likely order of preference, best first:

  1. using \N{} automatically loads the data needed to make it work, but
     no other functions magically become available

  2. using \N{} loads charnames normally, with documentation saying something
     like "at present, using \N{} will load the charnames package, but this
     is an implementation detail subject to change; if you're using functions
     from it, C<use charnames>"

  3. using \N{} loads charnames normally, and we 'fess up to it

-- 
rjbs

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