Smylers wrote:
Jon Lang writes:
FWIW, the current proposal for aliasing blocks of ambient text is
functional; it just feels a bit kludgey,
Why? To me it seems the opposite: what could be more natural for
delimiting a block of code than braces?
Because sometimes you'll want to capture only
Martin D Kealey wrote:
I wonder if this is becoming the new Perl mantra use lexically scoped
pragmata.
Larry said it much more succinctly: all's fair if you predeclare.
--
Jonathan Dataweaver Lang
On Wed, Aug 19, 2009 at 5:37 AM, Jan Ingvoldstadfrett...@gmail.com wrote:
On Wed, Aug 19, 2009 at 1:54 PM, Moritz Lenz via RT
perl6-bugs-follo...@perl.org wrote:
Since the discussion came up on #perl6 if this is really the expected
behaviour, S09 says:
As the end-point of a range, a lone
Damian Conway wrote:
When using the code block alias, are the outermost curly braces
considered to be part of the ambient code?
Yes. All ambient code is actual code.
OK. Let me propose an alternative (which I expect will be immediately
shot down):
Allow '=begin alias', '=end alias', and
FWIW, the current proposal for aliasing blocks of ambient text is
functional; it just feels a bit kludgey, and I'm a bit bothered by the
fact that you can't alias any ambient text other than a code block.
On Wed, Aug 19, 2009 at 11:29 AM, Damian Conwaydam...@conway.org wrote:
Jonathan Dataweaver
David Green wrote:
Jon Lang wrote:
Given that it's relatively easy to say 1..^*, I wouldn't mind
standardizing this so that '*' always refers to the element just past
the last one, at least when dealing with the standard index.
I like the DWIMmery, but the more I think about
'home' should be spelled '~'.
--
Jonathan Dataweaver Lang
On Tue, Aug 18, 2009 at 7:03 PM, Mark J. Reedmarkjr...@gmail.com wrote:
The OS-level chdir() and getcwd() are not thread-safe. The usual
advice is to ignore them completely in multithreaded programs, in
favor of absolute paths (or relative paths from a fixed location,
never calling chdir()).
Timothy S. Nelson wrote:
David Green wrote:
Jon Lang wrote:
If so, could you give some examples of how such a distinction could be
beneficial, or of how the lack of such a distinction is problematic?
Well, my main thought in this context is that the stuff that can be
done
Troels Liebe Bentsen wrote:
Hey,
Just joined the list, and I too have been thinking about a good path literal
for Perl 6. Nice to see so many other people are thinking the same :).
Welcome to the list!
Not knowing where to start in this long thread, I will instead try to show how
I would
On Sun, Aug 16, 2009 at 1:26 PM, Damian Conwaydam...@conway.org wrote:
* This means Pod can be indented; the = is no longer tied to the
first column. The indentation preceding the opening = (using the
($?TABSTOP // 8) rule, as for heredocs) now specifies the zeroth
column of the
Could we also get =numbered and =term directives that are
equivalent to =item :numbered and =item :term, respectively, for
use with abbreviated blocks? E.g.:
=numbered First Item
=numbered Second Item
=numbered Third Item
=term First Name
Definition
=term Second Name
On Tue, Aug 11, 2009 at 12:42 PM, Jon Langdatawea...@gmail.com wrote:
jerry gay wrote:
for the latest spec changes regarding this item, see
http://perlcabal.org/svn/pugs/revision/?rev=27959.
is everyone equally miserable now? ;)
Already seen it. My latest points still stand, though:
On Sat, Aug 15, 2009 at 7:17 AM, Timothy S. Nelsonwayl...@wayland.id.au wrote:
On Sat, 15 Aug 2009, Austin Hastings wrote:
This whole thread seems oriented around two points:
1. Strings should not carry the burden of umpty-ump filesystem checking
methods.
2. It should be possible to
Ben Morrow wrote:
However, I would much rather see a general syntax like
(# ... )
{# ... }
[# ... ]
with no whitespace allowed between the opening bracket and the #: this
doesn't seem to conflict with anything. Allowing # ... in rules would
also be nice.
That's rather elegant.
smuj wrote:
Jon Lang wrote:
smuj wrote:
Jon Lang wrote:
Here's a radical notion: use something other than '#' to initiate an
inline comment.
[snippage]
Or maybe just don't allow embedded comments unless they are actually
embedded, i.e. if a line starts with a # (ignoring leading
Ben Morrow wrote:
This appears to be leading to a :comment modifier on quotables, with
some suitable shortcut. Perhaps 'q#'? Or are we not allowed mixed alpha
and symbols?
It's probably a bad practice, if possible.
(I really want to suggest £, just to teach USAnians '#' isn't called
jerry gay wrote:
for the latest spec changes regarding this item, see
http://perlcabal.org/svn/pugs/revision/?rev=27959.
is everyone equally miserable now? ;)
Already seen it. My latest points still stand, though: #`(...) is
still vulnerable to ambiguity relative to #..., whereas `#(...),
On Mon, Aug 10, 2009 at 12:25 PM, Patrick R. Michaudpmich...@pobox.com wrote:
I'd be fine with the ##(embedded comment solution) approach (doubling
the #'s), but it's much less visually appealing to me. I think I'd
prefer to see a doubling of the bracketing chars instead of doubling
the #'s
On Mon, Aug 10, 2009 at 2:16 PM, Mark J. Reedmarkjr...@gmail.com wrote:
I still like the double-bracket idea. I don't much mind the extra
character; 5 characters total still beats the 7 of HTML/XML.
Agreed. As I said, the biggest potential stumbling block for this
would be the existence of a
On Mon, Aug 10, 2009 at 3:36 PM, Darren Duncandar...@darrenduncan.net wrote:
Personally, I think that comments should have trailing # as well as leading
ones, so they are more like strings in that the same character is used to
mark both ends.
You mean like the following?
q[quoted text]
smuj wrote:
smuj wrote:
Jon Lang wrote:
... the biggest potential stumbling block for this
would be the existence of a double-bracket that sees frequent use at
the start of a line. Query: does '' count as a double bracket, or
as a single bracket (since it's equivalent
Darren Duncan wrote:
Still, I like the idea of #...# also being supported from the point of
symmetry with '...' and ... also being supported, not that this is
necessary.
This is mutually exclusive with the practice of commenting out a bunch
of lines by prepending them with '#'.
--
Jonathan
smuj wrote:
Jon Lang wrote:
Here's a radical notion: use something other than '#' to initiate an
inline comment.
[snippage]
Or maybe just don't allow embedded comments unless they are actually
embedded, i.e. if a line starts with a # (ignoring leading whitespace)
then it's _always_ a line
Larry Wall wrote:
Moritz Lenz wrote:
: Either it's parsed as '@a[0] = (W, W)' (list assignment), then @a should
: get both elements, and so should @z.
Not according to S03, at least by one reading. �...@a[0] as a scalar
container only wants one item, so it only takes the first item off
the
Damian Conway wrote:
Mark J. Reed wrote:
My understanding is that the P6 way to do that is to return a Capture
containing the desired return values (which can lazily do things only
when accessed) in the appropriate slots.
Return a Capture or a more heavily overloaded object, depending on how
On Mon, Jul 20, 2009 at 6:03 PM, pugs-comm...@feather.perl6.nl wrote:
Author: lwall
Date: 2009-07-21 03:03:38 +0200 (Tue, 21 Jul 2009)
New Revision: 27635
Modified:
docs/Perl6/Spec/S03-operators.pod
Log:
[S03] rename 'nonchaining infix' to 'structural infix'
Modified:
On Mon, Jul 20, 2009 at 7:15 PM, Darren Duncandar...@darrenduncan.net wrote:
Jon Lang wrote:
On Mon, Jul 20, 2009 at 6:03 PM, pugs-comm...@feather.perl6.nl wrote:
Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6
Raphael Descamps wrote:
Am Freitag, den 10.07.2009, 17:06 -0700 schrieb Jon Lang:
How about this: in role composition, mandate causes methods to take
precedence over other methods with which they would normally conflict,
and to conflict with methods that would normally take precedence over
TSa wrote:
HaloO,
Jon Lang wrote:
Well, yes and no. The class still has the final say on how a given
method is to be implemented; the only thing being debated here is
whether or not the class should have to explicitly pull rank to
redefine a method being provided by a role, or if it does
Daniel Ruoso wrote:
Jon Lang wrote:
The key to understanding roles is to note that roles don't implement
methods; classes implement methods.
Er, while I see your point, Roles are not just interfaces... they are OO
components that can be plugged into other classes. They often are used
by dropping some bits from an existing
role would be useful sometimes, but it seems to lose one of the most useful
benefits of roles: as Jon Lang pointed out, R1 :withoutfoo bar would
effectively be a new role, one that doesn't do R1. But you want something
to do a role in the first place so
by dropping some bits from an existing
role would be useful sometimes, but it seems to lose one of the most useful
benefits of roles: as Jon Lang pointed out, R1 :withoutfoo bar would
effectively be a new role, one that doesn't do R1. But you want something
to do a role in the first place so
Larry Wall wrote:
Dave Whipp wrote:
Ovid wrote:
I'd like to see something like this (or whatever the equivalent Perl 6
syntax would be):
class PracticalJoke does Bomb does SomeThingElse {
method fuse() but overrides { ... }
}
The overrides tells Perl 6 that we're overriding the
On Fri, Jul 10, 2009 at 2:22 PM, Austin
Hastingsaustin_hasti...@yahoo.com wrote:
Mark J. Reed wrote:
I'm all for not having any variety of log() in the default namespace.
Regardless, mathematical functions should follow mathematical norms.
Changing Perl tradition is one thing, but we have
Jon Lang wrote:
supersede already has a meaning with respect to classes; and what
I'm thinking of would apply to classes as well as roles; so I'm going
to suggest another keyword.
How about this: in role composition, mandate causes methods to take
precedence over other methods with which
Jonathan Worthingtonjonat...@jnthn.net wrote:
Ovid wrote:
Though I have issues with Jonathan's approach (I don't like classes
silently discarding role methods as this has caused us many bugs at the
BBC), it's much cleaner that what I see here.
s/Jonathan's approach/Perl 6's approach/ # at
Jonathan Worthington wrote in YAPC::EU and Perl 6 Roles:
More fitting to me would be an adverb to the does trait modifier...
class C does R1 :withoutfoo bar does R2 :withoutbaz { ... }
The thing is that in this case, does the class actually do R1 and R2? If you
are going to derive an
On Tue, Jul 7, 2009 at 2:48 AM,
Ovidpubliustemp-perl6langua...@yahoo.com wrote:
Giving a talk about roles at YAPC::EU in Lisbon and I'm a bit stuck on how to
translate a Perl 5 example into Perl 6. Basically, Imagine a PracticalJoke
class which has fuse() and explode methods(). It needs
On Thu, Jun 25, 2009 at 1:20 PM, Moritz Lenzmor...@faui2k3.org wrote:
Hi,
I had the pleasure to implement the series operator (infix:...) in
Rakudo(*), and came across the difficulty to come up with a signature
for it. These are the use cases I want to cover:
1, 2 ... { $^a + $^b }
1 ... {
On Wed, Jun 24, 2009 at 10:35 AM, John Macdonaldj...@perlwolf.com wrote:
On Tue, Jun 23, 2009 at 07:51:45AM +1000, Damian Conway wrote:
Perl 6's approach to xor is consistent with the linguistic sense of
'xor' (You may have a soup (x)or a salad (x)or a cocktail), [ ... ]
That choice tends to
On Mon, Jun 22, 2009 at 4:12 PM, Minimiscienceminimiscie...@gmail.com wrote:
On Jun 22, 2009, at 5:51 PM, Damian Conway wrote:
Perl 6's approach to xor is consistent with the linguistic sense of
'xor' (You may have a soup (x)or a salad (x)or a cocktail), and also
with the IEEE 91 standard for
Take a look at the page to which Damian provided a link. You'll find
that XOR does indeed correspond to the definition being used by Perl
6, as well as the natural language meaning. What other languages call
XOR is actually an odd parity check.
As I suggested above, I think that Perl 6 already
On Fri, Jun 12, 2009 at 11:23 PM, Matthew
Waltonmatt...@matthew-walton.co.uk wrote:
Although some things may be able to be implemented far more
efficiently if they know that they're being called with infix:.= and
not with infix:..
Last I checked, Perl 6 had some types that are mutating and
On Fri, Jun 12, 2009 at 10:02 AM, yarynot@gmail.com wrote:
I am tickled pink to see an Array rotate method in the settings spec
S032, as I was thinking of writing up a little discussion on the very
topic.
Has there been discussion on using array rotate on multi-dimensional
arrays? Being
On Fri, Jun 12, 2009 at 10:58 AM, yarynot@gmail.com wrote:
* you can rearrange the dimensions themselves (e.g., transpose).
Reflecting on 2 or more axes creates a transposition.
No, it doesn't:
@a = (1, 2, 3; 4, 5, 6; 7, 8, 9);
Reflecting on two axes would result in:
@a = (9, 8,
On Fri, Jun 12, 2009 at 11:51 AM, Daniel Ruosodan...@ruoso.com wrote:
Ok, There's one thing that is not clear in the thread, which is when an
array is multidimensional or not...
For instance:
�...@a = (1, 2, 3; 4, 5, 6; 7, 8, 9);
Will produce a flatten array, because list assignment causes
2009/6/8 Ville Koskinen vrk...@iki.fi:
Hello all,
I was curious if this is possible in Perl 6:
%hash{ 'foo' 'bar' } = 'some value';
# %hash{'foo'} eq 'some value' and %hash{'bar'} eq 'some value'
By autothreading, this would be equivalent to:
(%hash{'foo'} %hash{'bar'}) = 'some
On Thu, Jun 4, 2009 at 9:57 AM, TSa thomas.sandl...@vts-systems.de wrote:
HaloO,
Daniel Ruoso wrote:
So the questions are:
* Are there any imperative barriers in Perl 6?
I would think that at least every method call is a barrier.
An object's lifetime is a sequence of states and methods
On Mon, Jun 1, 2009 at 5:44 PM, Daniel Carrera
daniel.carr...@theingots.org wrote:
I think we might need to come up with some sort of standard naming
convention to distinguish dependencies. Something that the *user* can
recognize quickly when he browses CPAN.
Why do we need the dependencies to
On Fri, May 29, 2009 at 6:52 AM, John Macdonald j...@perlwolf.com wrote:
Yep, I've done that.
But comparing the difference in effort between:
- press a key
- Google for a web page that has the right character set, cut, refocus, paste
means that I don't bother for the one or two weird
On Fri, May 29, 2009 at 6:53 PM, Darren Duncan dar...@darrenduncan.net wrote:
I had some thoughts lately about the Perl 6 operators, and wanted to bounce
some ideas.
Firstly, regarding the string replication ops as documented in Synopsis 3,
'x' and 'xx', I'm wondering whether it
Darren Duncan wrote:
Side note: one thing that I recently learned concerning implication
operators is that the direction of the implication doesn't necessarily
follow the direction of the arrow. In particular, A if B is A←B,
and A only if B is A→B: in both of the original statements, the
On Thu, May 28, 2009 at 1:37 AM, Daniel Carrera
daniel.carr...@theingots.org wrote:
Hi Damian,
This is a really good list. Mind if I copy it / modify it and post it
somewhere like my blog? One question:
* Compactness of expression + semi-infinite data structures:
�...@fib =
Andrew Whitworth wrote:
The issue mentioned in the Synopses is that junctions autothread, and
autothreading in a conditional could potentially create multiple
threads of execution, all of which are taking different execution
paths. At some point, to bring it all back together again, the
On Wed, May 27, 2009 at 7:05 AM, John Macdonald j...@perlwolf.com wrote:
On Tue, May 26, 2009 at 04:38:21PM -0700, yary wrote:
perl4-perl5.8 or so had a variable that let you change the starting
index for arrays, so you could actually make the above work. But then
everyone who'd re-arranged
Jonathan Scott Duff wrote:
Or perhaps
for 0...@foo.end - $k { ... }
@foo.keys may not be what the user wanted if @foo is a sparse array.
IIRC, you have to explicitly ask for the custom index in order to get
sparse array keys. By design, the normal index is never sparse;
only the custom
From S09, under Junctions:
The exact semantics of autothreading with respect to control
structures are subject to change over time; it is therefore erroneous
to pass junctions to any control construct that is not implemented via
as a normal single or multi dispatch. In particular, threading
On Thu, May 21, 2009 at 11:25 PM, John M. Dlugosz
2nb81l...@sneakemail.com wrote:
Larry Wall larry-at-wall.org |Perl 6| wrote:
And since the when modifier counts as a conditional, you can rewrite
grep Dog, @mammals
as
$_ when Dog for @mammals;
So perhaps will see a lot of subtypes
On Fri, May 22, 2009 at 5:34 AM, Timothy S. Nelson
wayl...@wayland.id.au wrote:
On Fri, 22 May 2009, Jonathan Worthington wrote:
Daniel Ruoso wrote:
Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu:
�...@primes = do $_ if prime($_) for 1..100;
becomes
�...@primes = $_ when
@@ -1836,6 +1836,12 @@
prototype objects, in which case stringification is not likely to
produce something of interest to non-gurus.)
+The C.^parents method by default returns a flattened list of all
+parents sorted in MRO (dispatch) order. Other options are:
+
+ :local
This message deals strictly with the syntax of '#='-based POD; the
semantics is a separate issue.
--
I'd like '#=' to follow similar rules to what '#' follows, with the
caveat that a line beginning with '#' counts as a single-line comment
no matter what the second character is. Specifically,
Martin Kealey wrote:
On Tue, 31 Mar 2009, Jon Lang wrote:
Another issue: what happens if conditional code mutates a junction
that it filtered? For example:
$x = any (-5 .. 5);
if $x 0 { $x++ };
At this point, which of the following does $x equal?
any(-4 .. 6) # the original
Jonathan Worthington wrote:
Jon Lang wrote:
Invocants:
* Does anyone object to roles having an invocant, and that invocant
referring to the class that is doing the role?
Yes; on further reflection, the ability to type that invocant raises all
kinds of possible WTFs without a good enough
On Wed, Apr 1, 2009 at 12:58 AM, Richard Hainsworth
rich...@rusrating.ru wrote:
Thinking about Jon Lang's -1|+1 example in another way, I wondered about
simultaneous conditions.
Consider
$x = any (1,2,5,6)
How do we compose a conditional that asks if any of this set of eigenstates
are
On Wed, Apr 1, 2009 at 5:07 AM, Daniel Ruoso dan...@ruoso.com wrote:
Em Ter, 2009-03-31 às 22:54 -0700, Jon Lang escreveu:
Yes, I know that there is no S08. I'm working on writing one, and I'd
like some feedback to help me do so.
++
My draft is going to be about Signatures and Captures
In Junction Algebra, Martin Kealey wrote:
On Mon, 30 Mar 2009, Mark J. Reed wrote:
( $a = any(-1,+1) = $b ) == ( $a = any(-1,+1) any(-1,+1) =
$b )
Clearly, the RHS is true for $a == $b == 0, but I'm not sure the LHS
shouldn't also be. Isn't it just syntactic sugar for the RHS?
I've been having some second thoughts concerning this. Here's where I
stand on it now:
In Perl 6, you have the following decision points, where code may or
may not be executed depending on a condition:
if/unless/while/until/loop/when statements; if/unless/while/until
statement modifiers;
Yes, I know that there is no S08. I'm working on writing one, and I'd
like some feedback to help me do so.
My draft is going to be about Signatures and Captures. Thus, my questions:
Invocants:
* Is it illegal to specify an invocant in a sub, or is it merely
nonsensical? That is, should the
On Sun, Mar 29, 2009 at 10:57 PM, Mark Lentczner ma...@glyphic.com wrote:
What I see here is that there is a tendency to want to think about, and
operate on, the eigenstates as a Set, but this seems to destroy the single
value impersonation of the Junction.
In my case, this tendency comes more
Here's another useful one:
any($x) eqv all($x) eqv one($x) eqv $x
but:
none($x) !eqv $x
That is, applying any, all, or one to a one-item list produces the
equivalent to a single item. For an empty list: any() eqv all() eqv
(). But what about one() and none()?
--
Jonathan Dataweaver
On Sun, Mar 29, 2009 at 1:18 PM, John Macdonald j...@perlwolf.com wrote:
On Sat, Mar 28, 2009 at 10:39:01AM -0300, Daniel Ruoso wrote:
That happens because $pa and $pb are a singular value, and that's how
junctions work... The blackjack program is an example for sets, not
junctions.
Now,
Moritz Lenz wrote:
Since afaict this is not specced, I'll hand that over to p6l.
Eric Hodges (via RT) wrote:
use v6;
rule test {test};
test ~~ /test/;
say '$/.keys = ', $/.keys.perl;
say '%($/).keys = ', %($/).keys.perl;
# outputs
# $/.keys = []
# %($/).keys = [test]
Same could be
Daniel Ruoso wrote:
But the semantics of sets are still somewhat blurry... there are some
possibilities:
1) Sets are in the same level as junctions, but have no collapsing and
allow you to get its values. The problem is if it autothreads on
method calls or not... It also makes $a
On Sat, Mar 28, 2009 at 6:39 AM, Daniel Ruoso dan...@ruoso.com wrote:
Em Sáb, 2009-03-28 às 13:36 +0300, Richard Hainsworth escreveu:
Daniel Ruoso wrote:
The thing is that junctions are so cool that people like to use it for
more things than it's really usefull (overseeing that junctions are
Thomas Sandlaß wrote:
Set operations are with parens.
Which Synopsis is this in?
--
Jonathan Dataweaver Lang
Henry Baragar wrote:
The blackjack program is an excellent example for junctions (and not so good
for sets, IMHO). The problem in the example above is that the calculation
of the value of a hand was not completed. The complete calculation is as
follows:
my $pa = ([+]
In the case of strings and numbers, I'd recommend using leg instead of
cmp - that is, coerce both items to strings, then compare the strings.
But as far as cmp goes, 3 cmp '3' should fail because a number
isn't a string.
--
Jonathan Dataweaver Lang
On Fri, Mar 27, 2009 at 10:39 AM, Dave Whipp d...@dave.whipp.name wrote:
Richard Hainsworth wrote:
The following arose out of a discussion on #perl6. Junctions are new and
different from anything I have encountered, but I cant get rid of the
feeling that there needs to be some more
Dave Whipp wrote:
[I’d been planning to put this suggestion on hold until the spec is
sufficiently complete for me to attempt to implement it as a module. But
people are discussing this again, so maybe it's not just me. I apologize if
I appear to be beating a dead horse...]
Jon Lang wrote
Damian Conway wrote:
Jon Lang wrote:
For that matter, I'm not seeing a difference between:
any( 12 ) # any of all of (1, 2)
...and:
any( 1, 2 ) # any of (1, 2)
Those two are very different.
any(1,2) == 2 is true
any(12) == 2 is false
Nested heterogeneous junctions
2009/3/24 Larry Wall la...@wall.org:
http://www.wall.org/~larry/camelia.pdf
Cute. I do like the hyper-operated smiley-face.
What I'd really like to see, though, is a logo that speaks to Perl's
linguistic roots. That, more than anything else I can think of, is
_the_ defining feature of Perl.
Darren Duncan wrote:
Jon Lang wrote:
Spitballing here: you drew an analogy to the feed operators. I wonder
if that analogy could be taken further: use -- and -- outside of
signatures as feed operators - but instead of feeding arrays back and
forth, have them feed capture objects and engage
Darren Duncan wrote:
Maybe the problem is a technicality with the parser because ...
I'm guessing that the problem is that until you see the -- then what you've
read so far on its left is ambiguous as to whether it is a result type or a
parameter. I can understand that but I don't know if
+ method !eigenstates (Junction $j: -- List)
Shouldn't that be lowercase-j junction?
--
Jonathan Dataweaver Lang
Larry Wall wrote:
I think I've mentioned before that .perl autothreads. It's the final
(low-level) stringification of a junction that slaps the appropriate
quantifier around that, I suspect.
Please bear with me; I'm starting to get a little lost: are you
telling me that $j.perl does what I'd
Darren Duncan wrote:
Jon Lang wrote:
Darren Duncan wrote:
I would assume that invoking .perl on a Junction would result in Perl
code
consisting of the appropriate any/all/etc expression. -- Darren Duncan
Tough to parse, though; and feels like a kludge. I expect better of Perl
6.
What
Larry Wall wrote:
Sigh. The current design of Junctions is quite extensible *because*
it is based on a real type. You can easily write operators that
work only on Junctions, just as you can easily write operators that
are transparent to Junctions or autothread on Junctions by declaring
Ovid wrote:
Requiring methods and requiring methods to be called are different things.
It might be a nice feature to have roles which tie into events. If a
particular condition doesn't hold true by, say, INIT time, the role fails.
How would I implement something like that in Perl 6? Or
OK: as I see it, this is how signatures work:
There are three broad use-cases for signatures: function parameters
(S06), role parameters (S14), and variable declarators (S03).
Question: Do binding operators (S03) count as a fourth use?
There are two broad styles of signatures: those that want an
Larry Wall wrote:
This is basically a non-problem. Junctions have one public method,
.eigenstates, which is vanishingly unlikely to be used by accident by
any mere mortal any time in the next 100 years, give or take a year.
If someone does happen to be programming quantum mechanics in Perl 6,
Darren Duncan wrote:
Jon Lang wrote:
Larry Wall wrote:
This is basically a non-problem. Junctions have one public method,
.eigenstates, which is vanishingly unlikely to be used by accident by
any mere mortal any time in the next 100 years, give or take a year.
If someone does happen
This isn't the first (or second, or third, or fourth...) time that
I've seen complications arise with regard to junctions. Every time,
the confusion arises when some variation of the question is it a
junction? is raised. Ultimately, this is because Perl is trying it's
darnedest to treat
On Sat, Mar 14, 2009 at 7:29 AM, Larry Wall la...@wall.org wrote:
: So if I were to say:
:
: rand $n:
:
: is the compiler smart enough to notice that trailing colon and
: recognize this as an indirect method call rather than two adjacent
: terms?
No, currently under STD you get:
+To declare an item that is parsed as a simple term, you must use the
+form C term:foo , or some other form of constant declaration such
+as an enum declaration. Such a term never looks for its arguments,
+is never considered a list prefix operator, and may not work with
+subsequent
Daniel Ruoso wrote:
Daniel Ruoso escreveu:
What really got me confused is that I don't see what problem this change
solves, since it doesn't seem that a signature that expects an invocant
(i.e.: cares about invocant) will accept a call without an invocant, so
method foo($b,$c) is export still
Darren Duncan wrote:
Here's a question:
Say I had an N-adic routine where in OO terms the invocant is one of the N
terms, and which of those is the invocant doesn't matter, and what we really
want to have is the invocant automatically being a member of the input list.
How about allowing
OK; let me get a quick clarification here. How does:
say Hello, World!;
differ from:
Hello, World!.say;
or:
say $*OUT: Hello, World!;
in terms of dispatching? And more generally, would there be a
reasonable way to write a single routine (i.e., implementation) that
could be
Thomas Sandlaß wrote:
The benefit of a dedicated Interval type comes from supporting set
operations (), (|) etc. which are still unmentioned in S03.
Have set operations been implemented in either Rakudo or Pugs?
BTW,
what does (1..^5).max return? I think it should be 4 because this
is the
Darren Duncan wrote:
In reply to Jon Lang,
What I'm proposing here in the general case, is a generic collection type,
Interval say, that can represent a discontinuous interval of an ordered
type. A simple way of defining such a type is that it is a Set of Pair of
Ordered, where each Pair
101 - 200 of 314 matches
Mail list logo