Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

p6ge compiler's namespace...

10 views
Skip to first unread message

William Coleda

unread,
Nov 22, 2004, 2:32:59 AM11/22/04
to Perl 6 Internals
Should the compilation sub for p6g3 be in the root namespace as it is currently, or moved to, say, a "p6ge" namespace?

Luke Palmer

unread,
Nov 22, 2004, 2:49:48 AM11/22/04
to William Coleda, Perl 6 Internals
William Coleda writes:
> Should the compilation sub for p6g3 be in the root namespace as it is
> currently, or moved to, say, a "p6ge" namespace?

I doubt we should be taking up the users' precious namespace with things
that aren't standardly prefixed.

It's likely that the p6ge_compile should be in P6GE, and that P6GEMatch
should be P6GE::Match (that is, [ "P6GE", "Match" ]).

Anyone disagree?

Luke

Patrick R. Michaud

unread,
Nov 22, 2004, 9:14:12 AM11/22/04
to Luke Palmer, William Coleda, Perl 6 Internals

Looks great to me -- I'll switch things around to (pardon the pun) match.
They'll become "P6GE::compile" (compiler sub) and "P6GE::Match", with
a note that P6GE::compile is still subject to change.

Also, since the library search path for load_bytecode has now been fixed,
it's probably worthwhile to move the p6ge.pir file into
runtime/parrot/library. I'm guessing it should become
runtime/parrot/library/P6GE.pir (note uppercase) since it's now
defining the P6GE:: namespace, but could someone confirm this for
me before I make the change?

Pm
- still discovering all of the conventions

Jerome Quelin

unread,
Nov 22, 2004, 1:27:18 PM11/22/04
to Patrick R. Michaud, Luke Palmer, William Coleda, Perl 6 Internals
On 04/11/22 07:14 -0700, Patrick R. Michaud wrote:
> Looks great to me -- I'll switch things around to (pardon the pun) match.
> They'll become "P6GE::compile" (compiler sub) and "P6GE::Match", with
> a note that P6GE::compile is still subject to change.

Well, since we're nitpicking conventions and consistency, what about:
PGE::compile
and PGE::match (instead of Match)

Jerome
--
jqu...@mongueurs.net

Patrick R. Michaud

unread,
Nov 22, 2004, 3:43:52 PM11/22/04
to Jerome Quelin, Perl 6 Internals

As Luke mentioned, "Match" is uppercase because it's a class.

However, I ended up naming the compilation routines based on what
they compile -- i.e., "p6rule", "p5re", and "glob". Note that this
may or may not eventually correspond to the string name that is
used as part of the C<compreg> opcode -- that's still to be worked
out.

Pm

Luke Palmer

unread,
Nov 22, 2004, 1:39:55 PM11/22/04
to Jerome Quelin, Patrick R. Michaud, William Coleda, Perl 6 Internals
Jerome Quelin writes:
> On 04/11/22 07:14 -0700, Patrick R. Michaud wrote:
> > Looks great to me -- I'll switch things around to (pardon the pun) match.
> > They'll become "P6GE::compile" (compiler sub) and "P6GE::Match", with
> > a note that P6GE::compile is still subject to change.
>
> Well, since we're nitpicking conventions and consistency, what about:
> PGE::compile
> and PGE::match (instead of Match)
>

Probably because PGE::compile is a sub and PGE::Match is a class :-)

Luke

0 new messages