perl-unicode

Interesting idea for string resources

2001-09-27 03:00:30
I was talking to Martin Durst at the recent Unicode Conference
in San Jose.
 
He had an interesting idea for resource strings.
 
Basically, invent a new quote operator (qL) and have it
call a user function to do resource lookup with dbm or
DBI or whatever.
 
It would look like:
 
print qL(The weather is $skycover today.);
 
package String::Resource;
 
sub qL {
   my ($s) = @_;
 
   my $out = lookup($s);
}
 
The reason for a new quote operator is to make resources
less noisy to read, and to do lexical and local interpolation.
 
Any comments?
 
James.

<Prev in Thread] Current Thread [Next in Thread>