Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Darren Duncan
Moritz Lenz wrote: Darren Duncan wrote: But some significant ones I don't know and really want to know: Bit Blob Set Bag Mapping I guess that Mapping is analog to the List/Seq case: :a(2), :ab; Sure, but given how Pair literals work, how would you know whether the above

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Moritz Lenz
Darren Duncan wrote: Hello, I'm wondering how to write anonymous value literals of some Perl 6 basic types, and I didn't see mention of this in synopsis 2. Now, with some basic types, I know how to do it, examples: Bool # Bool::True Int # 42 or 0x17 or :12AB9

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread mark . a . biggar
The literals for Bit are just 0 and 1. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Original message -- From: Carl Mäsak [EMAIL PROTECTED] Darren (): Bit Blob Set Bag Mapping How does one write anonymous value

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Carl Mäsak
Darren Duncan (): Regarding Blob, that's not a collection type and its a fundamental type and it still needs special syntax; I did suggest one in my previous message. Frankly, I don't see why it should need special syntax. Blobs are, most of the time, not typed in through the keyboard (too

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Daniel Ruoso
Em Seg, 2008-12-01 às 18:21 -0800, Darren Duncan escreveu: I'm wondering how to write anonymous value literals of some Perl 6 basic types, and I didn't see mention of this in synopsis 2. Getting away from your question entirely, I think the issue here is that while Perl 6 has support for

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Darren Duncan
Carl Mäsak wrote: Darren (): Bit Blob Set Bag Mapping How does one write anonymous value literals of those types? And I mean directly, not by writing a literal of some other type and using a conversion function to derive the above? Why is the latter method insufficient for your needs?

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Geoffrey Broadwell
On Tue, 2008-12-02 at 08:50 +0100, Carl Mäsak wrote: Darren (): Bit Blob Set Bag Mapping How does one write anonymous value literals of those types? And I mean directly, not by writing a literal of some other type and using a conversion function to derive the above? Why

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread David Green
On 2008-Dec-2, at 12:33 pm, Geoffrey Broadwell wrote: On Tue, 2008-12-02 at 08:50 +0100, Carl Mäsak wrote: Darren (): How does one write anonymous value literals of those types? Why is the latter method [conversion] insufficient for your needs? Efficiency reasons, among others. Surely the

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Darren Duncan
Daniel Ruoso wrote: Em Seg, 2008-12-01 às 18:21 -0800, Darren Duncan escreveu: I'm wondering how to write anonymous value literals of some Perl 6 basic types, and I didn't see mention of this in synopsis 2. Getting away from your question entirely, I think the issue here is that while Perl 6

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Geoffrey Broadwell
On Tue, 2008-12-02 at 13:07 -0700, David Green wrote: On 2008-Dec-2, at 12:33 pm, Geoffrey Broadwell wrote: On Tue, 2008-12-02 at 08:50 +0100, Carl Mäsak wrote: Darren (): How does one write anonymous value literals of those types? Why is the latter method [conversion] insufficient for

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Geoffrey Broadwell
On Tue, 2008-12-02 at 21:21 +0100, Leon Timmermans wrote: If you really want it, a macro can fix all of this for you. That's the beauty of macros: these kinds of things are possible if you need them. Sure, but user-written macros are also an easy out that allows one to avoid making hard