Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Larry Wall
On Tue, Apr 06, 2010 at 10:19:15PM -0700, Damian Conway wrote: : Larry concluded: : : > I do freely admit that most Perlfolk are not used to thinking of : > permissions in terms of set theory.  But as I said, we're looking at : > kind of a strange use case here, and perhaps not typical of the kind

Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Damian Conway
Larry concluded: > I do freely admit that most Perlfolk are not used to thinking of > permissions in terms of set theory.  But as I said, we're looking at > kind of a strange use case here, and perhaps not typical of the kinds > of sets of small numbers that people will be using in the future. Th

Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Larry Wall
On Tue, Apr 06, 2010 at 08:47:11PM -0700, Geoffrey Broadwell wrote: : First: what Damian said. : : Second: Whatever syntax people come up with has to make it easy and : type-safe to name particular combinations of those bits. : : In other words, you should be able to make a bitset with Unix-style

Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Larry Wall
On Tue, Apr 06, 2010 at 08:31:24PM -0700, Damian Conway wrote: : An issue came up in a class I was teaching today... : : There doesn't seem to be an easy way to create a type that allows a set : of enumerated bit-flags *and* all the combinations of those flags...and : nothing else. : : For exampl

Re: A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Geoffrey Broadwell
First: what Damian said. Second: Whatever syntax people come up with has to make it easy and type-safe to name particular combinations of those bits. In other words, you should be able to make a bitset with Unix-style permissions: OTHER_EXECUTE OTHER_WRITE OTHER_READ GROUP_EXECUT

A common and useful thing that doesn't appear to be easy in Perl 6

2010-04-06 Thread Damian Conway
An issue came up in a class I was teaching today... There doesn't seem to be an easy way to create a type that allows a set of enumerated bit-flags *and* all the combinations of those flags...and nothing else. For example: enum Permissions ( Read => 0b0001, Write => 0b0010, Exec => 0b0100 )

Good error messages: going the extra mile

2010-04-06 Thread Aristotle Pagaltzis
Hi Larry (mostly) et al, this sounds like something STD could try to steal: * > Okay, this may be going a bit far, but how else are you going > to fall completely in love with a compiler? > > $ cat t.c > void f0() { >