On Tue, Jan 21, 2020 at 5:00 AM Tom Browder <tom.brow...@gmail.com> wrote: > > On Mon, Jan 20, 2020 at 22:16 ToddAndMargo via perl6-users > <perl6-us...@perl.org> wrote: >> >> On 2020-01-20 20:09, ToddAndMargo via perl6-users wrote: >> > On 2020-01-20 19:55, ToddAndMargo via perl6-users wrote: > > ... >> >> > I think this is it: >> > >> > > sub x() returns Associative { my %h= A=>"a"; return %h} >> > &x >> > > x >> > {A => a} >> ... >> Yup, too high up the food chain: >> >> > sub x() returns Hash { my %h= A=>"a"; return %h} > > > The preferred syntax is: > > sub x(--> Hash) {...} > > See that in the docs. > > Larry Wall once warned that the "return..." syntax may be removed at some > point. > > -Tom >
"return..." is a common idiom in many programming languages, and keeping it around might help programmers ease their transition to raku/perl6. So I'd hate to see "return" go away--at least for the foreseeable future. --Bill.