develooper Front page | perl.perl5.porters | Postings from October 2015

Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
October 7, 2015 21:03
Subject:
Re: YA smartmatch proposal [ was: Re: smartmatch needs your eyes]
Message ID:
20151007220326.4a4242fa@shy.leonerd.org.uk
On Wed, 7 Oct 2015 15:57:26 -0400
Eric Brine <ikegami@adaelis.com> wrote:

>   Why not let the programmer write what he means explicitly, rather
> than implicitly on compile-time "type"?  I'm sure the maintainer
> would prefer (modulo obvious bikeshedding):

I like this idea - we have eq vs ==, so why not have different 'case'
style markers.

Maybe

  when(undef)
  when(Regexp)
  wheneq(STRING)
  when==(NUM)

?

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS

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