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

S02: reserved namespace ops

2 views
Skip to first unread message

TSa

unread,
Feb 21, 2006, 6:00:08 AM2/21/06
to perl6-l...@perl.org
HaloO,

S02 states "(Directly subscripting the type with either square brackets
or curlies is reserved for various generic type-theoretic operations. In
most other matters type names and package names are interchangeable.)"

What are these type-theoretic operations? And what do directly
attached < > pointy brackets on a type mean? How are they related
to « »? Is there something like ::_ as 'topic' type?

Here are the details of all four bracketing ops:

Foo($bar) # function call? constructor?
Foo .($bar) # same

Foo::($bar) # symbolic symbol lookup with outward scanning
Foo .::($bar) # same


Foo::<$bar> # direct symbol lookup without outward scanning
Foo::{'$bar'} # same
Foo .::<$bar> # same


Foo{$bar} # type constraint check?

Foo<$bar> # valid?
Foo«$bar» # valid?

Foo[$bar] # parametric type instanciation?

Foo::[$bar] # valid?
Foo .::[$bar] # same?
--

Larry Wall

unread,
Feb 22, 2006, 7:31:15 PM2/22/06
to perl6-l...@perl.org
On Tue, Feb 21, 2006 at 12:00:08PM +0100, TSa wrote:
: HaloO,

:
: S02 states "(Directly subscripting the type with either square brackets
: or curlies is reserved for various generic type-theoretic operations. In
: most other matters type names and package names are interchangeable.)"
:
: What are these type-theoretic operations? And what do directly
: attached < > pointy brackets on a type mean? How are they related
: to « »? Is there something like ::_ as 'topic' type?

Um, I always thought that "is reserved" in a spec means "we don't have
the foggiest idea what we'll do with this, but we have a suspicion
that if we let people use this particular thing right now, we'll
regret it someday."

So I'm just saying that the conservative thing for now is to require
people to say MUMBLE::<$foo> and (for now) forbid them from saying MUMBLE<$foo>.

: Here are the details of all four bracketing ops:


:
: Foo($bar) # function call? constructor?
: Foo .($bar) # same
:
: Foo::($bar) # symbolic symbol lookup with outward scanning
: Foo .::($bar) # same
:
:
: Foo::<$bar> # direct symbol lookup without outward scanning
: Foo::{'$bar'} # same
: Foo .::<$bar> # same
:
:
: Foo{$bar} # type constraint check?
:
: Foo<$bar> # valid?
: Foo«$bar» # valid?
:
: Foo[$bar] # parametric type instanciation?
:
: Foo::[$bar] # valid?
: Foo .::[$bar] # same?

s:g/valid\?/currently reserved/, but yes, that's pretty close to the current
state of affairs. You could remove the ? from Foo[$bar], I think.

Larry

TSa

unread,
Feb 23, 2006, 3:26:49 AM2/23/06
to perl6-l...@perl.org
HaloO,

Larry Wall wrote:
> Um, I always thought that "is reserved" in a spec means "we don't have
> the foggiest idea what we'll do with this, but we have a suspicion
> that if we let people use this particular thing right now, we'll
> regret it someday."

OK, but how official is theory.pod? I mean is it part of the spec?
It definitly doesn't fit the synopsis numbering. It's more like
the track the Hogwart's express uses ;)
--

Larry Wall

unread,
Feb 24, 2006, 8:11:49 AM2/24/06
to perl6-l...@perl.org
On Thu, Feb 23, 2006 at 09:26:49AM +0100, TSa wrote:
: HaloO,

It's not official at all. Anything in the notes directory should be
considered to be in the same superpositional state as Schroedinger's Cat.

Larry

0 new messages