News for hackers. Stuff that matters.
Re:Why Would Anyone Use Perl 6? by senekerim on Wednesday January 13, 2016 @09:11AM (#10894328)
This looks awful to my (mathematically trained) eyes. What is the rationale behind introducing this language feature?
Re:Why Would Anyone Use Perl 6? by awwaiid on Wednesday January 13, 2016 @11:10AM (#10895304)
* Seems kinda cool

* Makes $x == 5|6 look kinda cool

* $string ~~ /<first>/ & /<second>/ & /<third>/ # matches all three regexes. huh. kinda cool

* (5|6).foo maybe we can do that in cpu-parallel (it doesn't now)? That might be kinda cool

* sub is-prime($n where $n > 2) { $n % none(2..sqrt($n)) == 0 } # Logical O(1) prime test if only you had that quantum-coprocessor? That... would be kinda cool

* ... you might notice a pattern to the motivation for this feature :)

Re:Why Would Anyone Use Perl 6? by masklinn on Wednesday January 13, 2016 @09:15AM (#10894353)
I really couldn't tell you. I guess "it's perl, we can"?
Re:Why Would Anyone Use Perl 6? by raiph on Wednesday January 13, 2016 @10:55AM (#10895188)
One that I recall that I'm hoping still applies is having a syntactically and conceptually lightweight way to express semantically parallel computation logic. Given the code:

  junction1 = val1 | val2 | val3;
  junction2 = val4 & val5;
  if junction1 op junction2 { ... };
the compiler is free to fire off several threads, or set up a lower level SIMD parallel process, with short-circuiting, to compute the conditional result.
Re:Why Would Anyone Use Perl 6? by hahainternet on Wednesday January 13, 2016 @09:27AM (#10894449)
Could you explain why you think this is awful? Perl 6 has proper sets, bags and the appropriate operators for 'normal' set operations too.