On Fri, May 24, 2019 at 2:52 PM Ed . <ej...@hotmail.com> wrote: > > Just to be clear; you're saying that Perl (which seems quite nice) > illustrates the plus side of things being methods?
Yes. My categorical statement was too broad. I'm not sure what the sweet spot is between ease of use and mandating a clean core namespace so that we don't have collisions. > > -----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