I posted my thoughts as a sort of white paper here:
http://www.dlugosz.com/files/static-type.pdf
This needs to be fleshed out. Decisions need to be made. Anyone want to
discuss it with me?
--John
Mark J. Reed markjreed-at-mail.com |Perl 6| wrote:
On Mon, Apr 14, 2008 at 2:32 PM, Jonathan Worthington
my Dog $fifi .= new(); # works in Rakudo too ;-)
And even in Pugs! :) Doesn't help with literals, though, e.g.
my Float $approx_pi = 3.14;
So the idea of marking the use of
To me the foo looks like a template sub and I wonder how it is
instanciated with different types. Since type parameters are
provided with [] it should be foo[Int], foo[Str] and the like.
I wonder further if that could also be written foo of Str like
with Array of Int etc.
my foo of Int &intfo
Doug McNutt douglist-at-macnauchtan.com |Perl 6| wrote:
At 09:58 -0700 4/14/08, Larry Wall wrote:
By the way, you don't need to put parens around the arguments to X. It takes a
list on either side. We made it tall so that it would stand out visually
anyway:
$a,$b,$c X $x,$y,$z
H
On Mon, Apr 14, 2008 at 2:32 PM, Jonathan Worthington
> my Dog $fifi .= new(); # works in Rakudo too ;-)
And even in Pugs! :) Doesn't help with literals, though, e.g.
my Float $approx_pi = 3.14;
--
Mark J. Reed <[EMAIL PROTECTED]>
Mark J. Reed wrote:
I don't care for the use of * there, but it would be nice to have some
way to declare the variable to have the type implied by its
initializer, where the complier can tell what that is, so you could
remove the redundancy in this:
my Dog $fido = new Dog();
while still allowin
I don't care for the use of * there, but it would be nice to have some
way to declare the variable to have the type implied by its
initializer, where the complier can tell what that is, so you could
remove the redundancy in this:
my Dog $fido = new Dog();
while still allowing the var declared via
On Mon, Apr 14, 2008 at 11:47:04AM -0600, Doug McNutt wrote:
: At 09:58 -0700 4/14/08, Larry Wall wrote:
: >By the way, you don't need to put parens around the arguments to X. It takes
a list on either side. We made it tall so that it would stand out visually
anyway:
: >
: >$a,$b,$c X $x,$y,
On 2008-Apr-13, at 4:07 am, John M. Dlugosz wrote:
I'm thinking that 'constant' is more special than other variables,
and that the formal description of strong typing and static types
should say that the compiler =will= implicitly get the type for $pi
rather than making it Any.
Except if c
At 09:58 -0700 4/14/08, Larry Wall wrote:
>By the way, you don't need to put parens around the arguments to X. It takes a
>list on either side. We made it tall so that it would stand out visually
>anyway:
>
>$a,$b,$c X $x,$y,$z
How long before some engineer or 3D graphic artist gets really
On Mon, Apr 14, 2008 at 06:28:06PM +0200, TSa wrote:
> The original question was sort of about how to write a list
> that has .elems == 1 but "no" content.
Wouldn't that just be [[]] ?
Mark J. Reed <[EMAIL PROTECTED]>
On Mon, Apr 14, 2008 at 06:28:06PM +0200, TSa wrote:
> HaloO,
>
> Larry Wall wrote:
>> No, the inner () is also in list context, and () in list context
>> always just disappears.
>>
>> And 0,1 X () is going to be (). Perl 6's infix: is defined over
>> lists, not sets. If you want to overload X fo
HaloO,
I wrote:
Then [X]() also is ()? How about (0,1) X ([]) === (0,1)?
The original question was sort of about how to write a list
that has .elems == 1 but "no" content.
Other ideas are: [[]] and @@() with the latter not very likely
because it implies any multidimensional array somehow havin
HaloO,
Larry Wall wrote:
No, the inner () is also in list context, and () in list context
always just disappears.
And 0,1 X () is going to be (). Perl 6's infix: is defined over
lists, not sets. If you want to overload X for set types, you may.
Then [X]() also is ()? How about (0,1) X ([])
On Mon, Apr 14, 2008 at 12:05:15PM +0200, TSa wrote:
> But X is cooperating with , in Perl 6:
>
> (0,1) X (()) === ((0,()),(1,())) === (0,1)
>
> That is, X strips the outer list and comma concatenates the
> inner empty list away.
No, the inner () is also in list context, and () in list context
a
HaloO,
Brandon S. Allbery KF8NH wrote:
our ::T sub foo (T $a, T $b)
without needing to introduce a new twigil syntax for type variables.
My reading as well. But I would write it sub foo (::T $a, T $b --> T)
for better indicating that ::T is taken from the parameters.
(Although I would won
On Apr 14, 2008, at 12:05 , TSa wrote:
HaloO,
Xavier Noria wrote:
{0, 1} X {{}} = {(0, {}), (1, {})}
which, you see, is different from {0, 1}. They have different
elements. The fact that there's a clear mapping that sort of
identifies them has nothing to do with set equality.
But X is
HaloO,
Xavier Noria wrote:
{0, 1} X {{}} = {(0, {}), (1, {})}
which, you see, is different from {0, 1}. They have different elements.
The fact that there's a clear mapping that sort of identifies them has
nothing to do with set equality.
But X is cooperating with , in Perl 6:
(0,1) X
>-Original Message-
>From: Mark A. Biggar [mailto:[EMAIL PROTECTED]
>Sent: Sunday, April 13, 2008 11:22 PM
>To: Miller, Hugh
>Cc: Moritz Lenz; p6l
>Subject: Re: cross operator and empty list
>
>Miller, Hugh wrote:
>>> From: Moritz Lenz [mailto:[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] wro
On Apr 12, 2008, at 17:37 , Moritz Lenz wrote:
[EMAIL PROTECTED] wrote:
Technically the Cartesian cross operator doesn't have an identity
value.
It has.
The set which contains only the emty set, or in perl terms ([]);
If (a, b) denotes an ordered pair you get
{0, 1} X {{}} = {(0, {}),
nice work,
I think this kind of redrafting can be a good foundation for
refactoring ... though I would go further and suggest an xml based
format ... if u have a .odt you can convert this to docbook ;)
one nit pick; drop 'rigorous' in title
Jim Fuller
21 matches
Mail list logo