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 expect of an indeterminate item,
and that the trick is in getting a perlization of the Junction itself?
 If so, cool.

> 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.

Or maybe there's a method that returns a "frozen reference" that
masquerades as the Junction, but doesn't trigger autothreading.  Or
would that be opening up an infinitely regressing can of worms?  I
don't know; I've got this gut feeling that something's off here, but I
can't quite put my finger on what it is.

Although, maybe I can.  As written (I believe), .perl generates a
String representation of whatever code is needed to build the object
that called it.  However, there may come a point somewhere down the
road where you'll want .perl to instead return a parse-tree of that
code, with the ability to stringify appropriately.  If you've written
a separate .eigenstring function to perform the same purpose with
Junctions, or you've set it up so that prefix:<~> autothreads while
Junction.Str returns the eigenstring, that will potentially be two
functions that will need to be rewritten.

More generally, a programmer who writes a function that operates on an
Object (and thus autothreads when given a Junction) will be forced to
decide between writing a second Junction-aware version if he wants to
treat the Junction as a Junction instead of autothreaded Objects, or
not bothering and thus not allowing the function to manipulate a
Junction directly.  In short, you have to reinvent the wheel every
time the "to Junction or not to Junction" question arises.  Providing
a means to momentarily disable a Junction's autothreading properties
would, in one fell swoop, solve every instance of this problem.  At
least, I think it would.  If it wouldn't, it would at least solve a
large swath of them.

-- 
Jonathan "Dataweaver" Lang

Reply via email to