On Mon, Mar 16, 2009 at 09:24:58PM -0700, Jon Lang wrote:
: 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 to be programming quantum mechanics in Perl 6,
: >>> they're probably smart enough to work around the presence of a
: >>> reserved--well, it's not even a reserved word-- a reserved method name.
: >>
: >> Actually, the problem isn't with '.eigenstates'; the problem is with
: >> '.perl'.  If I'm viewing a Junction of items as a single indeterminate
: >> item, I'd expect $J.perl to return a Junction of the items' perl by
: >> default.  Admittedly though, even that isn't much of an issue, seeing
: >> as how you _can_ get that result by saying something to the effect of
: >> "Junction of $J.eigenstates.«perl" - the only tricky part being how to
: >> decide which kind of junction to use (e.g., any, all, one, none) when
: >> putting the perl-ized eigenstates back together.  (And how _would_ you
: >> do that?)  This would represent another corner-case where the
: >> programmer would be tripped up by a simplistic understanding of what a
: >> Junction is; but being a corner-case, that's probably acceptable.
: >
: > 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.

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.  So maybe $j.Str returns the
eigenstring, while prefix:<~> autothreads.  Or maybe there's a method
named .eigenstring or some such for use by print and say and anyone
else who absolutely must end up with something printable.

Larry

Reply via email to