News for hackers. Stuff that matters.
Re:"Useless Ruby sugar": Argument forwarding by chrismorgan on Friday November 24, 2023 @01:31PM (#38406739)
> In a radical variant of this, Perl’s sub doesn’t have a syntax for arguments declaration at all

Actually, Perl has had signatures <https://perldoc.perl.org/perlsub#Signatures> as an experimental feature (requiring `use feature 'signatures'`) since 5.20.0 (May 2014), and they’re considered stable (requiring `use v5.36` or later) since 5.36.0 (May 2022):

  use v5.36;

  sub test($x, $y) {
    print "x=$x y=$y\n"
  }

  test(1, 2)
  # prints x=1, y=2
Re:"Useless Ruby sugar": Argument forwarding by zverok on Friday November 24, 2023 @03:31PM (#38407906)
Oh, thanks! Added a footnote to the article.