develooper Front page | perl.perl6.language | Postings from December 2008

Re: how to write literals of some Perl 6 types?

Thread Previous | Thread Next
From:
TSa
Date:
December 3, 2008 00:28
Subject:
Re: how to write literals of some Perl 6 types?
Message ID:
4936432C.7050207@vts-systems.de
HaloO,

Darren Duncan wrote:
>>> But some significant ones I don't know and really want to know:
>>>
>>>    Bit

Here we could get away with defining two new enums, e.g.
Bit::High and Bit::Low. And I want to pose the question if
we really need two types Bool and Bit.

>>>    Blob
>>>    Set
>>>    Bag
>>>    Mapping

> [..] having Seq|List is a start, but good 
> Set|Mapping|Bag syntax is needed too.

I also think that the Set and Bag types need better syntactic
support. I value constructions like '$x (in) (1,2,3)' as good
as '$x == 1|2|3' or even better because junctions have the potential
to behave different than expected. With set operations the operator
makes it clear what is intended. Junctive behavior is always lurking
in seemingly harmless constructions like '$x == $y'. Note that the
automatic creation of sets from lists of lists is ambiguous because
it is unclear if they shall become a set of lists or a set of sets.


Regards, TSa.
-- 

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About