strategy for multiple packages in fewer files (was Re: [file name extension])

2008-01-07 Thread Darren Duncan
At 8:41 AM -0800 1/7/08, Paul Hodges wrote: A small tangent that might be relevant -- what's the current convention for, say, putting several related "packages" in the same file? I do that frequently in my Perl modules, and so do modules like DBI. I believe that it is a good idea to do some pa

Re: S02 interpolation of entire hashes

2008-01-07 Thread Larry Wall
On Mon, Jan 07, 2008 at 05:23:36PM -0800, Dave Whipp wrote: > The tests in S02 L > appear to assume that an interpolated hash renders its keys in a sorted > order. But this property doesn't seem to be stated in the text. Is it true > that the keys are always sorted for interpolation? No, the te

Re: S02 interpolation of entire hashes

2008-01-07 Thread Jonathan Lang
Dave Whipp wrote: > The tests in S02 L > appear to assume that an interpolated hash renders its keys in a sorted > order. But this property doesn't seem to be stated in the text. Is it > true that the keys are always sorted for interpolation? (is it possible, > in P6, for hash keys to not be compar

S02 interpolation of entire hashes

2008-01-07 Thread Dave Whipp
The tests in S02 L appear to assume that an interpolated hash renders its keys in a sorted order. But this property doesn't seem to be stated in the text. Is it true that the keys are always sorted for interpolation? (is it possible, in P6, for hash keys to not be comparable?)

[svn:perl6-synopsis] r14483 - doc/trunk/design/syn

2008-01-07 Thread larry
Author: larry Date: Mon Jan 7 16:02:31 2008 New Revision: 14483 Modified: doc/trunk/design/syn/S02.pod Log: paste-os noticed by David Green++ Modified: doc/trunk/design/syn/S02.pod == --- doc/trunk/design/syn/S02.po

Re: will be a computed goto in perl 6

2008-01-07 Thread Larry Wall
max.

Re: will be a computed goto in perl 6

2008-01-07 Thread Larry Wall
On Mon, Jan 07, 2008 at 08:22:34PM +0100, herbert breunung wrote: > if we take TimTowtdi strictly, the anser would be yes :) Just as in Perl 5, you can say "goto $label", with no guarantees on efficiency. > sorry for nagging but my question about existence of ($min, $max) = > @array.minmax also

Re: $?OS semantics

2008-01-07 Thread Larry Wall
On Mon, Jan 07, 2008 at 02:05:18PM -0500, Trey Harris wrote: > And mix the role in to $*OS. Then call $*OS.trytolink() to get the proper > behavior at the proper time. Imagine a Beowulf cluster of those, and now $*OS might even point to thread-specific data. Larry

Re: $?OS semantics

2008-01-07 Thread chromatic
On Monday 07 January 2008 08:42:06 Trey Harris wrote: > Then we can have roles that describe cross-cutting behavior of various > OS's (like POSIX): > >    my &trytolink; >    give $?OS { >       when OS::HasSymlinks { &trytolink := &*symlink; } >       when OS::HasLinks    { &trytolink := &*link;

will be a computed goto in perl 6

2008-01-07 Thread herbert breunung
if we take TimTowtdi strictly, the anser would be yes :) sorry for nagging but my question about existence of ($min, $max) = @array.minmax also seems vaporized. cheers herbert

Re: what should be the default extension?

2008-01-07 Thread David Green
On 1/7/08, Trey Harris wrote: In a message dated Mon, 7 Jan 2008, Richard Hainsworth writes: May I suggest the following extension to the 'use ' pragma, viz. use in Oh please, no. The entire point of the wording currently in the synopsis is so that we can have platform-independent locatio

Re: $?OS semantics

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Larry Wall writes: On Mon, Jan 07, 2008 at 11:42:06AM -0500, Trey Harris wrote: So $?OS isn't "the type of OS", it's *the OS*, and you can manipulate the OS through it. Note that $?OS is the OS that is-or-was running at compile time, whereas $*OS is the OS r

Re: $?OS semantics

2008-01-07 Thread Larry Wall
On Mon, Jan 07, 2008 at 11:42:06AM -0500, Trey Harris wrote: > So $?OS isn't "the type of OS", it's *the OS*, and you can manipulate the > OS through it. Note that $?OS is the OS that is-or-was running at compile time, whereas $*OS is the OS running right now (at run time). Those don't have to b

$?OS semantics

2008-01-07 Thread Trey Harris
Sorry, quoting myself... In a message dated Mon, 7 Jan 2008, Trey Harris writes: given $?OS { when m:i:/win/ { use Foo in WinFoo.pm } when m:i:/nix/ { use Foo in UnixLikeFoo.pm } } It strikes me that $?OS and $?OSVER should probably not be strings (as they now are in Pugs) and shoul

Re: what should be the default extension?

2008-01-07 Thread Paul Hodges
A small tangent that might be relevant -- what's the current convention for, say, putting several related "packages" in the same file? In p5, I might write a great Foo.pm that loads Foo::Loader.pm and Foo::Parser.pm and Foo::Object.pm; I'd usually drop them into seperate files and have one load t

Re: what should be the default extension?

2008-01-07 Thread Trey Harris
In a message dated Mon, 7 Jan 2008, Richard Hainsworth writes: May I suggest the following extension to the 'use ' pragma, viz. use in constrained by local system> Oh please, no. The entire point of the wording currently in the synopsis is so that we can have platform-independent location o

Re: what should be the default extension?

2008-01-07 Thread Richard Hainsworth
May I suggest the following extension to the 'use ' pragma, viz. use in constrained by local system> For justification, see below. There were some hot replies to what I thought was a fairly trivial question. A corollary perhaps of an observation in "Parkinsons Law" - people on committees arg