Deborah Ariel Pickett wrote:

Luke wrote:


   $foo = 1 | 2 | 4
   print $foo;
   # Foo is now just one of (1, 2, 4); i.e. not a junction
Just a sanity check, but is this kind of behaviour something we still
want from junctions?

Perhaps the above should just print JUNCTION(0x1234) or something,
like the other built-in types do.
But in Perl 6, they *don't*. The serialize somehow (probably by calling
their C<.serialize> method).

And I suspect that junctiosn serialize as follows:

	* Disjunctions (C<any>s) serialize to their eigenstates.

	* Conjunctions (C<all>s) and abjunctions (C<one>s)
	  with exactly one eigenstate serialize to that.

	* Every other junction serializes to some representation of
          its junctive type and internal states (e.g. "all(1,2)",
	  "none('Crosby', 'Stills', 'Nash', 'Young')", etc.)

Damian

Reply via email to