Just to be clear; you're saying that Perl (which seems quite nice) illustrates the plus side of things being methods?
-----Original Message----- From: Diab Jerius Sent: Thursday, May 23, 2019 10:32 PM To: pdl-devel@lists.sourceforge.net ; Ed . Subject: Re: [Pdl-devel] PDL release; I'm volunteering. On Thu, May 23, 2019 at 1:27 PM Diab Jerius <djer...@cfa.harvard.edu> wrote: > My philosophy is that the only things that should be methods are those > that require knowledge of the private innards of a piddle, or that are > required for implementing overloaded operators (useful for subclassing > PDL. I had to write overload::reify to deal with some of the PDL > overloads). Keep the core tight, and everything else becomes a > function, which users have much more control over. > I wrote that with my C++ hat on. And then I wrote this Perl code: my ( $min, $max ) = $data->signal->where( $data->index == $idx )->minmax; and remembered how clean method chaining is. Oh, the horror. _______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel