On Wed, Apr 20, 2005 at 06:57:00PM +0200, BÁRTHÁZI András wrote: : It ends, when a non opened ')', a ';' or a '}' is coming. Of course, : that's not all cases, but it seems to be not so hard to find the all : possible cases.
The question is what will be clear to the reader of the code. : >We should avoid installing fads or domain-specific sublanguages into : >Standard Perl 6, but it's easy enough to change the language with a : >single "use" or macro. I see that doing select is trivial and doesn't : >impact anything in Standard Perl 6, since Perl 5's select() is likely : >going away anyway. : : I'm not sure, if XML is more domain specific than regexp or not. I think : it's somewhere related to text processing as much as regexpes. I was classifying XML as "fad". :-) : > $a=`<elems><elem>Content #1</elem><elem>Content #2</elem></elems>; : : I don't like it. I've learned at Perl 5 and in other languages, that ` : need a closing `. I think that would be relatively easy to unlearn. : 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. :) Sure, just not in Standard Perl 6, which lasts no longer than down to the first "use". : > $a=`select * from table`; : : It looks better, but I think ` isn't needed for it. Anyway, I agree, : that SQL is a more domain specific language, that it should come from a : module - at least you have to give for initialization somewhere the : server address, the user and the password (or other connection : parameters), so it's better to do it at with a setup sub. : : Anyway, it's possible to write: : : $a=sql<select * from table>; I think something like that is a lot more readable than the "dangling" sql syntax. : >I've gone ahead and terminated the sql variant like a quote construct : >just to clarify the end of it, since SQL is not so obviously : >self-terminating : >as XML is. : : If MS Comega and E4X can do it, I think Perl 6 could do it easily, too. ;) It can do it easily. Just not by default. :-) : >You could not, of course, have both of those unless you did lookahead : >to see if the next thing was < or select. Hmm, maybe that should be : >standard behavior for user-defined ` extensions. If the actual : : I agree, except the notation. Details, details... Now where did I put my spare bikeshed... :-) Larry