OT
On Mon, 6 Dec 2004, Luke Palmer wrote:
Well, there's always domain and range, if we want to be
mathematical.
[snip]
What you want here is domain and codomain. Which leads me to
believe that you don't want either.
For the record, in most connections range would be just as good. Indeed
Larry Wall [EMAIL PROTECTED] wrote:
Also says maybe you could attach a block to a hash or array to
define what subscripting does. Hmm.
That's...wow.
class Patient {
my DBI::Connection $db;
my Patient @byid[Int $id] {
select_patients(SELECT * FROM patients WHERE patientid = ?,
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Luke Palmer) wrote:
David Green writes:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Larry Wall) wrote:
Maybe type parameters are just subscripts? [...]
my Fight %fight does key{Dog;Cat};
I like that.
Yeah, me too. Except I'm
Matt Diephouse [EMAIL PROTECTED] wrote:
On Tue, 7 Dec 2004 00:39:08 -0800, Brent 'Dax' Royal-Gordon
my Patient @byid[Int $id] {
select_patients(SELECT * FROM patients WHERE patientid = ?,
$id)[0];
}
multi my Patient %byname{String $last} {
select_patients(
On Sat, 04 Dec 2004 08:01:46 -0700, [EMAIL PROTECTED] (David Green) wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Larry Wall) wrote:
S9 talk about it. We current have things like:
my Cat %pet is shape(Str);
and parameters to types are in square brackets, so it's more like:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Larry Wall) wrote:
Maybe type parameters are just subscripts? [...]
my Fight %fight does key{Dog;Cat};
I like that.
But if English-like is the criterion that'd still read better as
my Fight %fight has key{Dog;Cat};
I like that even
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Smylers) wrote:
No! Avoid synonyms. They're initially tempting, because then everybody
gets to pick the one he/she wants to use, but then it turns out you need
to learn all of them so as to read other people's code, and that's worse
than not
David Green writes:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Larry Wall) wrote:
Maybe type parameters are just subscripts? [...]
my Fight %fight does key{Dog;Cat};
I like that.
Yeah, me too. Except I'm having trouble seeing how key is a role. It's
not adding anything into a
On Mon, Dec 06, 2004 at 05:43:16AM +, Nigel Sandever wrote:
: I probably missed teh comprehensive dismissal thread, but why not 'type'?
:
: my %pet is Hash[:type(Str) :returns(Cat)];
Well, type is just a little off in a couple of ways. On the one hand,
it's not specific enough,
On Mon, 6 Dec 2004, Larry Wall wrote:
Hmm. Also says maybe you could attach a block to a hash or array to
define what subscripting does. Hmm.
That's tantalizing. Did you have something like this in mind:
# Count number of accesses to each key
our %counter_hash;
my %hash is subscripted
-
On Mon, Dec 06, 2004 at 03:11:15AM -0700, David Green wrote:
[snip]
: I like that.
[snip]
: I like that even better.
[snip]
: I'm happy with those too (perhaps because I do want to be a bit
: mathematical).
[snip]
: is FAT? Yeah, that works for me too. =)
[snip]
: I would take that as an
Larry Wall writes:
But pretty much every time I've introduced synonyms into Perl I've
come to regret it. But hey, if I introduce *different* synonyms this
time, does that count as making a new mistake?
No! Avoid synonyms. They're initially tempting, because then everybody
gets to pick the
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Larry Wall) wrote:
S9 talk about it. We current have things like:
my Cat %pet is shape(Str);
and parameters to types are in square brackets, so it's more like:
my %pet is Hash[:shape(Str) :returns(Cat)];
I still prefer shaped, for
On Sat, Dec 04, 2004 at 08:01:46AM -0700, David Green wrote:
: In article [EMAIL PROTECTED],
: [EMAIL PROTECTED] (Larry Wall) wrote:
: S9 talk about it. We current have things like:
: my Cat %pet is shape(Str);
: and parameters to types are in square brackets, so it's more like:
: my
On Dec 4, 2004, at 10:57 AM, Larry Wall wrote:
Well, I just put is shape because that's what the PDLers settled on,
but as far as I'm concerned linguistically, it could just be is dim.
That would settle the make-it-like-English question by making it
not at all like English.
On the aesthetic hand,
On Fri, Dec 03, 2004 at 05:23:56PM -0500, Abhijit Mahabal wrote:
: A6 included examples of syntax for specifying the type of the key for a
: hash:
:
: my %pet is Hash(keytype = Str, returns = Cat)
:
: None of the synopses have anything like this. S6 talks about the
: types of values, but not
On Fri, 3 Dec 2004, Larry Wall wrote:
: None of the synopses have anything like this. S6 talks about the
: types of values, but not keys. Oversight, or is this syntax dead?
S9 talk about it.
Oops. Sorry. So it was oversight after all :)
--abhijit
Abhijit Mahabal
17 matches
Mail list logo