Judd, all -
I just re-read through this thread. When I said, "Cool idea!" what I meant
was that it was cool that Perl could actually support such a construction.
Whether it is a good idea or not is a different question. In light of
Judd's observations, I suppose this would be one more way that PDL would
make itself distinct from normal Perl, and I'm not really a fan of that.
Niceslice aside, PDL is a library, not a language extension. The way that
the docs talk about being able to write "pdl" scripts, and even being able
to put "#!/usr/local/pdl" in your shebang line (or at least, I gathered
this was possible once upon a time) makes it easy for a novice to get the
misconception that pdl is actually a distinct language from Perl.
As for documentation style consistencies, I think that a cleanup would be
wonderful. I don't even care how that cleanup would look, just so long as
the documentation style was specified somewhere so we could easily point
new contributors to it. I do not have the time at the moment to
substantially contribute to a docs cleanup.
David
On Fri, Jan 10, 2014 at 10:40 AM, Judd Taylor <***@orbitalsystems.com>wrote:
> My opinion on this is that I don't like it.
>
> I think one of the major negatives I always hear about Perl and PDL is
> that the syntax is so varied. It's often hard to read other's code, and
> everybody is always doing something different.
>
> Supporting the '.' IMO, is just more of the same, making things more
> confusing for users in the end.
>
> I mean, we already have 'or' and '||', maybe we can have 'dot' and '.' and
> 'arrow' and '->'. That would be very Perl-like ;)
>
> This is not confusing at all, for example:
> $result = $pdl dot slice(";") . $pdl2 arrow index(3);
>
>
> So, that's my curmudgeon opinion. In a related note, it would be a good
> idea IMO, to try to unify the syntax that everybody is using all over PDL,
> which has even more variance that most perl. We have multiple ways to slice
> (nice slice, which IMO I will never use as it's confusing to read when you
> are used to using symbolic references), and the documentation, demos, and
> examples are not all using the same PDL style.
>
> If it were my project, I would have someone go over everything to ensure a
> consistent style is used everywhere in the documentation, and then have a
> separate doc for each style variant where just that variant is discussed on
> its own.
>
> I think something like this will go a long way towards attracting users.
> There's nothing more frustrating that going by old docs, asking a question
> which is then answered with code you can't even recognize or read, and then
> scratching your head and not learning anything in the process because the
> code you have that now works doesn't match the docs you're using. It's like
> we've created a tower of babel here.
>
> Again, this is just my opinion on the subject... feel free to disregard if
> you want.
> ____________________________
> Judd Taylor
> Software Engineer
>
> Orbital Systems, Ltd.
> 3807 Carbon Rd.
> Irving, TX 75038-3415
>
> (972) 915-3669 x127
>
> ________________________________________
> From: Chris Marshall [***@gmail.com]
> Sent: Monday, December 09, 2013 9:59 AM
> To: pdl-porters
> Subject: Re: [Pdl-porters] PDL3 method call syntax idea
>
> On Sun, Dec 8, 2013 at 10:52 AM, Chris Marshall <***@gmail.com>
> wrote:
> >
> > One perl5 wart that seems to bother folks trying out
> > PDL is the fact that our method call syntax is via ->
> > while C++ and Python and others ended up using
> > a dot (I think perl6 uses . as well).
>
> I forgot the elephant in the room: MATLAB/Octave use a dot
> for their OO deref as well. Even if we don't allow this feature
> generally, a PDL::Matlab module that would make PDL
> more Matlab/Octave user friendly would be nice to have....
>
> > I wondered if we could add that as a possible
> > modification for PDL3. I figured we could just use
> > PDL::NiceSlice3 to hack it in---admittedly not to
> > be preferred. Then it occurred to me, what about
> > simply overloading the . operator. I don't know if
> > the precedence would work out but it might be
> > doable.
> >
> > Wild or workable...comments?
> > Chris
>
> _______________________________________________
> PDL-porters mailing list
> PDL-***@jach.hawaii.edu
> http://mailman.jach.hawaii.edu/mailman/listinfo/pdl-porters
>
> _______________________________________________
> PDL-porters mailing list
> PDL-***@jach.hawaii.edu
> http://mailman.jach.hawaii.edu/mailman/listinfo/pdl-porters
>
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." -- Brian Kernighan