Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Matt
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

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Larry Wall
On Wed, Apr 20, 2005 at 01:51:11PM -0400, Matt wrote: : 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

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Juerd
Matt skribis 2005-04-20 13:51 (-0400): 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: It is possible to create your own sql// if you want it. for q:sql/SELECT * FROM table WHERE id=$id/ {

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread BÁRTHÁZI András
Hi, What is the benefit of this syntax over having a simple function that takes one argument, interpolating variables from CALLER::? for sql 'SELECT * FROM table WHERE id=$id' { ... } The difference is between compile time parsing and runtime parsing. This expression can be transformed to a

Re: Fwd: Re: embedding languages in Perl 6

2005-04-20 Thread Matt
On Wed, 20 Apr 2005 14:13:42 -0400, Larry Wall [EMAIL PROTECTED] wrote: Heredocs are variants on q:toSQLPROC these days, but if you're going to be mixing Perl and SQL syntax, it's probably better to dispense with the heredoc and just have a language variant so that you can parse it at compile