Re: dimensionality in Perl 6

2010-11-19 Thread Moritz Lenz
Am 19.11.2010 05:45, schrieb Jon Lang: On Thu, Nov 18, 2010 at 8:25 PM, Carl Mäsak wrote: Jon (>): Here's my proposal for how to handle dimensionality in Perl 6: [...] Thoughts? The idea has come up before, everyone thinks that Perl 6 and unit handling are a good fit for each ot

Re: dimensionality in Perl 6

2010-11-18 Thread Buddha Buck
On Thu, Nov 18, 2010 at 11:53 PM, Jon Lang wrote: > Buddha Buck wrote: >> I don't think a Num is necessary, but I could see a Rat. > > As is, is Duration implemented by means of a Num, or a Rat?  Whichever > it is, that's the type that the difference of two Instances would > return (properly tagge

Re: dimensionality in Perl 6

2010-11-18 Thread Carl Mäsak
Jon (>>>), Carl (>>), Jon (>): >>> Here's my proposal for how to handle dimensionality in Perl 6: >>> >>> [...] >>> >>> Thoughts? >> >> The idea has come up before, everyone thinks that Perl 6 and unit >> handl

Re: dimensionality in Perl 6

2010-11-18 Thread Jon Lang
Buddha Buck wrote: > Jon Lang wrote: >> Here's my proposal for how to handle dimensionality in Perl 6: >> >> Create a "units" trait that is designed to attach to any Numeric >> object.  Dimensional information gets stored as a baggy object - that &g

Re: dimensionality in Perl 6

2010-11-18 Thread Buddha Buck
Jon Lang asked me if I intended to send this message to him privately. The answer is "No"... -- Forwarded message -- From: Buddha Buck Date: Thu, Nov 18, 2010 at 10:39 PM Subject: Re: dimensionality in Perl 6 To: Jon Lang On Thu, Nov 18, 2010 at 7:58 PM, Jon L

Re: dimensionality in Perl 6

2010-11-18 Thread Jon Lang
On Thu, Nov 18, 2010 at 8:25 PM, Carl Mäsak wrote: > Jon (>): >> Here's my proposal for how to handle dimensionality in Perl 6: >> >> [...] >> >> Thoughts? > > The idea has come up before, everyone thinks that Perl 6 and unit > handling are a go

Re: dimensionality in Perl 6

2010-11-18 Thread Carl Mäsak
Jon (>): > Here's my proposal for how to handle dimensionality in Perl 6: > > [...] > > Thoughts? The idea has come up before, everyone thinks that Perl 6 and unit handling are a good fit for each other, and we're basically waiting for someone to write such a module.

Re: dimensionality in Perl 6

2010-11-18 Thread Doug McNutt
At 16:58 -0800 11/18/10, Jon Lang wrote: >If this is implemented, Duration should be an alias for something to >the effect of "Num but units". Otherwise, Instant and >Duration remain unchanged. > >Thoughts? with special attention to:

dimensionality in Perl 6

2010-11-18 Thread Jon Lang
Here's my proposal for how to handle dimensionality in Perl 6: Create a "units" trait that is designed to attach to any Numeric object. Dimensional information gets stored as a baggy object - that is, something that works just like a Bag, except that the count can go negative. (