develooper Front page | perl.perl5.porters | Postings from September 2001

[james@rf.net: Interesting idea for string resources]

Thread Next
From:
Jarkko Hietaniemi
Date:
September 27, 2001 16:37
Subject:
[james@rf.net: Interesting idea for string resources]
Message ID:
20010928023726.Q17814@alpha.hut.fi
----- Forwarded message from James Briggs <james@rf.net> -----

Subject: Interesting idea for string resources
From: James Briggs <james@rf.net>
Date: Thu, 27 Sep 2001 02:59:48 -0700 (PDT)
Message-Id: <200109270959.f8R9xmt10067@rf.net>
To: perl-unicode@perl.org
Posted-Date: Thu, 27 Sep 2001 02:59:48 -0700 (PDT)

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.

----- End forwarded message -----

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About