News for hackers. Stuff that matters.
Re:Perl 6 Introduction by awwaiid on Saturday November 28, 2015 @10:02AM (#10641202)
[minor syntax/markup edits]

One that has caught my fancy are various uses of the "Whatever Star". This appears as a * in a few contexts. In many it is really a shortcut for the "Whatever" class, so you can use it in function signatures to enter sort of "automatic mode".

  @shuffled_names = @names.pick(*) # randomly pick... however many you have. whatever.
But I think more interesting and different than that is using whatever-star as an automatic lambda thing.

  @nums.map(*/2 + 3)              # expression-lambda from context around a whatever-star
  @nums.map( -> $n { $n/2 + 3 } ) # equivalent with a real stabby arrow lambda
  @nums.map( { $^n/2 + 3 } )      # $^n is a generated alphabetical-positional argument
I suppose this isn't really fundamental... but is definitely different.
Re:Perl 6 Introduction by wantarray on Wednesday December 02, 2015 @07:34PM (#10666955)
I'm pretty sure that the "expression-lambdas" were inspired by Haskell, where you get a lambda simply by writing an operator with one or more missing operands.

In Perl 6, detecting that an operand is "missing" isn't possible due to the existence of prefix/infix/postfix operators with the same names, so it expects a "whatever" star in place of the missing operand... :)