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

does <> imply () or are pairs special?

4 views
Skip to first unread message

Juerd

unread,
Mar 12, 2005, 3:40:46 PM3/12/05
to perl6-l...@perl.org
%foo<bar>

is really

%foo{'bar'}

and
:foo<bar>

is actually

:foo('bar')

naturally,

:foo<bar>, 'baz'

is

:foo('bar'), 'baz'

but is

reverse<bar>, 'baz'

then

reverse('bar'), 'baz'

? And if that is so, then is

reverse <bar>, 'baz'

any different?


Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html

Larry Wall

unread,
Mar 12, 2005, 6:36:56 PM3/12/05
to perl6-l...@perl.org
On Sat, Mar 12, 2005 at 09:40:46PM +0100, Juerd wrote:
: %foo<bar>

:
: is really
:
: %foo{'bar'}
:
: and
: :foo<bar>
:
: is actually
:
: :foo('bar')

But it's not--it's actually

:foo{'bar'}

What's happening is that :foo is using the subscript syntax oddly.

: naturally,


:
: :foo<bar>, 'baz'
:
: is
:
: :foo('bar'), 'baz'

Nope,

:foo{'bar'}, 'baz'

: but is
:
: reverse<bar>, 'baz'
:
: then
:
: reverse('bar'), 'baz'

No, that's

reverse{'bar'}, 'baz'

which makes sense only if reverse returns something that
can be hash subscripted.

: ? And if that is so, then is


:
: reverse <bar>, 'baz'
:
: any different?

That's the same as

reverse qw/bar/, 'baz'

Larry

0 new messages