Xiao Yafeng wrote:
I don't think an array of hashes and a hash of arrays could perfectly
represent a Table type.
There are several important facts of a relational model:unordered
columns and tupples, various constraints on columns. E.g. how can we
represent multi-unique constraints as an array of
Timothy S. Nelson wrote:
On Sat, 4 Apr 2009, Darren Duncan wrote:
Speaking of libraries, I already implemented a table type ... it's
called Set::Relation/::V2 and its on CPAN right now ... for Perl 5 ...
I still have to port it to Perl 6, unless someone else wants to do
that, but I designed it
On Sat, 4 Apr 2009, Darren Duncan wrote:
Speaking of libraries, I already implemented a table type ... it's called
Set::Relation/::V2 and its on CPAN right now ... for Perl 5 ... I still have
to port it to Perl 6, unless someone else wants to do that, but I designed it
so that would be easy to
I don't think an array of hashes and a hash of arrays could perfectly
represent a Table type.
There are several important facts of a relational model:unordered
columns and tupples, various constraints on columns. E.g. how can we
represent multi-unique constraints as an array of hashes?
On 4/4/09,
Timothy S. Nelson wrote:
On Sat, 4 Apr 2009, Xiao Yafeng wrote:
I mean whether I can see Set as a table and Bag as a table with a
unique constraint? like:
I think you have that backwards. A Set is conceptually like a Bag with a
uniqueness constraint, not the other way around.
s
On Sat, 4 Apr 2009, Xiao Yafeng wrote:
3. Could I define primary key for a bag variable?
All items in a Bag are "primary keys", but there's no data additional
data associated with it.
I mean whether I can see Set as a table and Bag as a table with a
unique constraint? like:
subse
On Fri, Apr 3, 2009 at 10:52 PM, Moritz Lenz wrote:
> Xiao Yafeng wrote:
> > 1. Could I set multi-return type?like
> > sub test as (Int, Str) {...}
>
> "as" is coercion - so to what would it coerce? Int or Str? How could the
> compiler know? Or do you mean something like
On Fri, 3 Apr 2009, Moritz Lenz wrote:
Xiao Yafeng wrote:
1. Could I set multi-return type?like
sub test as (Int, Str) {...}
"as" is coercion - so to what would it coerce? Int or Str? How could the
compiler know? Or do you mean something like a tuple?
I thin
Moritz Lenz wrote:
>> 2. set is unordered collection of values, subset is new type. People are
>> apt to confuse the two concepts.
>
> Note that people never write "subset" in their code, the write things like
> sub f($x where { ... } ) and the "where" constructs the subset type. I
> don' thi
Xiao Yafeng wrote:
> 1. Could I set multi-return type?like
> sub test as (Int, Str) {...}
"as" is coercion - so to what would it coerce? Int or Str? How could the
compiler know? Or do you mean something like a tuple?
> 2. set is unordered collection of values, subset is n
1. Could I set multi-return type?like
sub test as (Int, Str) {...}
my (Int, Str) sub test {...}
or my (Int|Num, Str) sub test{...}
2. set is unordered collection of values, subset is new type. People are
apt to confuse th
11 matches
Mail list logo