Re: Smooth or Chunky?

2007-01-23 Thread Larry Wall
On Tue, Jan 23, 2007 at 07:23:31PM -0800, Darren Duncan wrote: : At 6:22 PM -0800 1/23/07, Larry Wall wrote: : >Recently I started redefining C to return multislices such that : > : >map { $_, $_ * 10 }, 1..3 : > : >seems to return 1,10,2,20,3,30 by default, but in a multidimensional : >context

Re: Smooth or Chunky?

2007-01-23 Thread Darren Duncan
At 6:22 PM -0800 1/23/07, Larry Wall wrote: Recently I started redefining C to return multislices such that map { $_, $_ * 10 }, 1..3 seems to return 1,10,2,20,3,30 by default, but in a multidimensional context: @@multislice := map { $_, $_ * 10 }, 1..3 it would have the value [1,10],

Smooth or Chunky?

2007-01-23 Thread Larry Wall
I've been struggling lately with a missing generalization, and I'm not sure how it's going to play out, so I thought I'd ask for advice, or at least think out loud a bit. Perl has always had functions and listops that take a flat list and do something with each element. Perl has also had various

Re: Fwd: Numeric Semantics

2007-01-23 Thread Jonathan Scott Duff
On 1/23/07, Paul Seamons <[EMAIL PROTECTED]> wrote: > While I'm in general agreement with everything you've said it makes me a > tad nervous to hinge so much on the difference of one character. Can you > imagine trying to track down the bug where > > if ($alpha === $beta) { ... } > > reall

Re: Fwd: Numeric Semantics

2007-01-23 Thread Paul Seamons
> While I'm in general agreement with everything you've said it makes me a > tad nervous to hinge so much on the difference of one character. Can you > imagine trying to track down the bug where > > if ($alpha === $beta) { ... } > > really should have been > > if ($alpha == $beta) { ... }

Fwd: Numeric Semantics

2007-01-23 Thread Jonathan Scott Duff
I accidently sent this just to Darren ... -Scott -- Forwarded message -- From: Jonathan Scott Duff <[EMAIL PROTECTED]> Date: Jan 22, 2007 6:23 PM Subject: Re: Numeric Semantics To: Darren Duncan <[EMAIL PROTECTED]> On 1/22/07, Darren Duncan <[EMAIL PROTECTED]> wrote:. I thin

Re: Numeric Semantics

2007-01-23 Thread Jonathan Scott Duff
On 1/22/07, Doug McNutt <[EMAIL PROTECTED]> wrote: At 00:32 + 1/23/07, Smylers wrote: > % perl -wle 'print 99 / 2' > 49.5 I would expect the line to return 49 because you surely meant integer division. Perl 5 just doesn't have a user-available type integer. That doesn't mean that I sur

Re: Numeric Semantics

2007-01-23 Thread Larry Wall
On Mon, Jan 22, 2007 at 08:47:22PM -0800, Darren Duncan wrote: : At 5:56 PM -0800 1/22/07, Larry Wall wrote: : >Whether a Num that happens to be an integer prints out with .0 is a : >separate issue. My bias is that a Num pretend to be an integer when : >it can. I think most folks (including mathe

Re: Numeric Semantics

2007-01-23 Thread TSa
HaloO Darren Duncan wrote: Up front, I will say that, all this stuff about 1 vs 1.0 won't matter at all if the Int type is an actual subset of the Num type (but whose implementation is system-recognized and optimized), meaning that Int and Num are not disjoint, as "most folks" usually expect t