[Please be careful with attributions -- I didn't write any
 of the quoted material...]

Russ Allbery wrote:
> >>      sub test {
> >>          my($foo, $bar, %baz);
> >>          ...
> >>          return \%baz;
> >>      }

> That's a pretty fundamental aspect of the Perl language; I use that sort
> of construct all over the place.  We don't want to turn Perl into C, where
> if you want to return anything non-trivial without allocation you have to
> pass in somewhere to put it.

There's no problems at all with that code. It's not going to break under
Perl 6. It's not going to be deprecated -- this is one of the ultimate
Keep Perl Perl language features!

I think that there's a lot of concern and confusion about what it means to
replace perl's current memory manager (aka garbage collector) with something
else. The short-term survival guide for dealing with this is "only believe
what Dan says." The longer-term guide is "only believe what Benchmark says."

There are only three Perl-visible features of a collector that I can think
of (besides the obvious "does it work?"):

1. How fast does it run?
2. How efficient is it? (i.e. what's the overhead?)
3. When does it call object destructors?

The first two are too early to talk about, but if Perl 6 is worse than
Perl 5 something is seriously wrong.

The last has never been defined in Perl, but it's definitely something to
discuss before the internals are written. Changing it could be a *major*
job.

- Ken

Reply via email to