I sent this to BÁRTHÁZI only instead of BÁRTHÁZI and the list as well. So here's a forward of what I sent and he replied to.

------- Forwarded message -------
From: Matt <[EMAIL PROTECTED]>
To: "BÁRTHÁZI András" <[EMAIL PROTECTED]>
Cc:
Subject: Re: embedding languages in Perl 6
Date: Wed, 20 Apr 2005 13:12:43 -0400

On Wed, 20 Apr 2005 12:57:00 -0400, BÁRTHÁZI András <[EMAIL PROTECTED]>
wrote:


It would be nicer to say:

$a=xml<elems><elem>Content #1</elem><elem>Content #2</elem></elems>;

But native xml parsing is better, I think. :)

Anyway, it's possible to write:

$a=sql<select * from table>;


If not already possible, it would be neat to be able to define your own quote blocks. Such as being able to define how to parse the below lines:

$result = q:sql/SELECT * FROM table/;

        for q:sql/SELECT * FROM table WHERE id=$id/ {
                say $_.id ~ ' -> ' ~ $_.value;
        }

Or someone could write a module for P6SQL ? (Pardon me for not remembering
exactly how HEREDOCs work in P6)

        p6sql_query "SQLPROC">>

        $result = SELECT * FROM table
        FOREACH ROW IN $result AS $field
                SAY $field.id " -> " $field.value
        END FOREACH

        SQLPROC

Or maybe I'm getting a bit too crazy.



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to