Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Quantum::Superpositions prob

by TimToady (Parson)
on Mar 25, 2004 at 19:30 UTC ( [id://339851]=note: print w/replies, xml ) Need Help??


in reply to Re: Quantum::Superpositions prob
in thread Quantum::Superpositions prob

Well, I don't know if you count this as a real-world app yet, but Perl 6 will support superpositions (known there as "junctions") out of the box. So you'll probably see lots of real programs eventually that say things like:
if $x == 1 | 2 | 4 | 8 {...}
without realizing that they've just generated and used an any(). (And TheDamian's forthcoming Perl6::Junctions module is just a reworking of Quantum::Superpositions without all the hifalutin' physics jargon, and with the lofalutin' infix junctional operators.)

And before you ask, yes, we renamed the Perl 5 bitops to something else just so that we could steal them for junctions. That's how important we think they are.

Replies are listed 'Best First'.
Re: Re: Re: Quantum::Superpositions prob
by flyingmoose (Priest) on Mar 25, 2004 at 20:38 UTC
    So that is apparently an 'any', so is 'all' still supported with Perl6 core? Can we still do cool stuff like if (any($h,$i,$j) < all ($x,$y,$z)) ? How does that look? I am supposing the junctions would not support arithmetic operations between junctions? (If there is an article or a usenet thread I should read, feel free to point me to it if this is complicated)

    Anyhow, color me excited!

      Yes. Yes. The same, only you can drop the outer parens on the if. Why would you suppose that? Deja is your friend.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://339851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found