The point of TIMTOWTDI is to offer different sensible ways to achieve the same goal. I fail to see how your proposition offers something that can be generally used. If we were to add every little feature X or Y dream of, Perl would be called PHP.

Curiously enough you may think that I am one of those who would like to "add every little feature X or Y dream of", but evidence is that I am not. An example that springs to mind is a recent clpmisc discussion in which someone contended that a trim() function to trim whitespace in front and at the end of a string "should be added in core". For me

s/^\s+//, s/\s+$// for $str;

is enough.

It is not in contrast with either TMTOWTDI nor with Perl philosophy altogether to add sensible new features especially where current ones are still somewhat lacking and force you to something clumsy and awkward as a workaround.

Comparing my "proposal" with PHP is somewhat of bending the truth, for there's a relevant difference between adding a little bit of unobtrusive semantics and bloating the main namespace with just so many little functions that could be built out of a tiny number of smaller pieces, which is what happens with that language, if I understand correctly.

But that's definitely not something everyone would need shipped with his perl.

Definitely! And I never intended to claim the contrary. It's also definitely something no one should be bothered seeing shipped with her perl. It's something that at least five out of eight partecipants to this thread seemed to receive very positively, while other two didn't express any disliking, simply providing examples of how to get something similar with existing perls. Also, I'm not intending to boast the node reputation, but it indicates that quite a lot of people who didn't followup did like it too.

Anyway, I'm not trying to conVince you. We simply have different views on this particular issue. And anyway we're discussing about something that is most probably not going to be implemented in any case, so we can end it up here.


In reply to Re^4: A pair of "mathematical" attributes for arrays? by blazar
in thread A pair of "mathematical" attributes for arrays? by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.