skaller wrote:
> Do you mean like this?
>
> /////////////////////////////////////////
> #import <flx.flxh>
> val name = "Erick";
> print$ q"Hello $name\n";
>
> /////////////////////////////////////////
>
> [EMAIL PROTECTED]:/work/felix/svn/felix/felix/trunk$ f nam
> Hello Erick
>
> The $ interpolation allows an arbitrary expression if you use
> brackets like $(expr) so there's no problem with dictionary
> substitutions via STL map or whatever.
>
> I would have liked to merge f".." and q".." strings into
> the one kind, but at the moment they're separate features.

The q"..." form is a compile-time feature, right? I'm not sure that 
could work for html templating, as that would have you dynamically 
loading the strings from a file. I should have been a little more clear. 
A python equivalent would be something like:

 >>> t = Template(open('foo.html').read())
 >>> t.render({"first_name": "Erick", "last_name": "Tryzelaar"})


I do like q"..." and f"..." though. I wonder if something like that 
type-safe printf could be used that I think oleg came up with. I'll look 
into that tomorrow.

-e

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to