develooper Front page | perl.fwp | Postings from July 2003

Re: merlyn smeared by Python Johnnies' description of Schwartzian transform

Thread Previous
From:
Abigail
Date:
July 16, 2003 08:21
Subject:
Re: merlyn smeared by Python Johnnies' description of Schwartzian transform
Message ID:
20030716152101.GA2199@abigail.nl
On Wed, Jul 16, 2003 at 01:37:27PM +0200, A. Pagaltzis wrote:
> * Abigail <abigail@abigail.nl> [2003-07-16 11:33]:
> > Yes.  GRT usually have the form:
> > 
> >     @sort = map { ... }
> >             sort
> >             map { ... } @unsorted;
> > 
> > with often pack/unpack in the map blocks, while an ST is
> > usually structured as:
> > 
> >     @sort = map  {$_ -> [0]}
> >             sort { ... }
> >             map  {[$_ => ...]} @unsorted;
> 
> It has been argued that a GRT is just a special form of an ST.

Yeah, I heard that once before as well. Now if articles, posts, or other
texts explaining ST that were written before the introduction of GRT
had a decent number of examples of a block-less sort, I'd agree with you.

But I just go with what most people seem to think, that GRT and ST are
different techniques. And I think they are right. For me, the important
difference is that in ST the data to be sorted is left as is, other data
(on which the sort block acts) is extracted, and this other data is
discarded at the end, while in GRT, the data gets modified, the modified
data gets sorted, and then the data is reassembled again.


Abigail

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About