develooper Front page | perl.perl6.language | Postings from July 2010

Re: Suggested magic for "a" .. "b"

Thread Previous | Thread Next
From:
Brandon S Allbery KF8NH
Date:
July 30, 2010 06:30
Subject:
Re: Suggested magic for "a" .. "b"
Message ID:
4C52D3DB.7030401@ece.cmu.edu
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/29/10 08:15 , Leon Timmermans wrote:
> On Thu, Jul 29, 2010 at 3:24 AM, Darren Duncan <darren@darrenduncan.net> wrote:
>>  $foo ~~ $a..$b :QuuxNationality  # just affects this one test
> 
> I like that
> 
>>  $bar = 'hello' :QuuxNationality  # applies anywhere the Str value is used
> 
> What if you compare a QuuxNationality Str with a FooNationality Str?
> That should blow up. Also it can lead to action at a distance. I don't
> think that's the way to go.

It's half right;  the coding set should be part of the type.  Explicit
conversion is probably a good idea too.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      allbery@kf8nh.com
system administrator  [openafs,heimdal,too many hats]  allbery@ece.cmu.edu
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxS09sACgkQIn7hlCsL25U69wCdFeqshkDQx24C6QT7Q7XlmF85
zmcAoK7969GXHUwhF9bZ+NPv8xy3qR5m
=vFdg
-----END PGP SIGNATURE-----

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