On Thu, Jul 18, 2013 at 07:07:20PM +0800, Richard Hainsworth wrote:
> I wondered whether the desire to have sets in perl6 was driven by
> mathematical fashion sensitivity (in some roundabout unconscious
> way) and because sets are important to mathematical foundations.
> Sets do not implement well on a computer.
I suspect that these two statements, taken together, give a large
part of the reason Perl 6 has sets implemented in the core.
They're an important part of the mathematics that program(mer)s
use to solve problems, and without a common foundation it's
easy to come up with many suboptimal implementations. A similar
argument exists for Temporal and date/time objects.
Also, in earlier days of Perl 6 discussions, we discovered
that people would learn about junctions and then try to use them
to solve set-based problems. This frequently led to many dead-end
discussions about trying to generalize junctions to that purpose.
Having sets and set operators explicitly included in the core is
intended to also guide people away from the false path of thinking
that junctions are the Perl 6 vehicle for set-based operators.