Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Perl::Improved Volume 0, Number 1

by NodeReaper (Curate)
on Sep 04, 2004 at 23:10 UTC ( [id://388534]=perlmeditation: print w/replies, xml ) Need Help??

This node was taken out by the NodeReaper on Sat Sep 4 19:25:47 2004 (EST)

Replies are listed 'Best First'.
Re: Perl::Improved Volume 0, Number 1
by theorbtwo (Prior) on Sep 05, 2004 at 11:44 UTC

    Your abs() critique raises points that I haven't seen raised around here before, at least in this purticular context... but it gets the conclusion wrong, by (I suspect conciously) only considering the point against the status quo -- that is, that there is a convention for writing the absolute value in mathematics, and that perl should follow that convention.

    This misses a whole slew of points in the other direction. The first, and probably most important, is that special cases are bad. There's a whole bunch of functions in perl, and there's no purticular reason that this purticular function should be written differently then the rest of them. It's simply not that important. There are functions that do have special syntax -- +, -, *, /, %, x, for example -- but those are generally more important -- indeed, even in math, they're normally called "operators", not "functions".

    Secondly, there's also a convention in other programming languages to use abs() as the absolute-value function.

    Thirdly, we already have uses for |, and important ones at that. It turns out they don't conflict as a matter of grammar, but they can easily conflict within the mind of the programmer.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      I'm not convinced that the use of |...| to mean abs(...) doesn't break the existing grammar or introduces ugly whitespace dependency:

      1+|a+b|+c+d|+1
      can be naively parsed as
      1+abs(a+(b|+c)+d)+1
      or as
      1+abs(a+b)+c+(d|+1)

      because the ugly unary + is allowed, which breaks lots of things. Of course, introducing another slew of operator precedence could fix this, but I imagine it creates more confusion than the "clearer" syntax removes.

        Ah, thank you! My intuition told me that they conflicted, but I couldn't come up with a case -- largely because I forgot about unary +.

      A reply falls below the community's threshold of quality. You may see it by logging in.

      I'd guess these points haven't been raised before because noone feels the need, and because most people instinctively understand that this particular proposition cannot possibly work.

      He'll be able to try this and any other outlandish ideas he thinks would make the language better for himself once Perl6 is here.

      Makeshifts last the longest.

        Next we'll need to have "Keyboard::Improved" to give us keys to represent other mathematical functions such as the integral symbol, the nth root symbol, longhand division symbols, Pi, Sigma, and so on. Seriously, if we're going to nitpick about abs() versus |-5|, we'll have to do away with the entire fn() idiom as applied to the programmers version of mathematical symbols.


        Dave

      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl::Improved Volume 0, Number 1
by Wassercrats (Initiate) on Sep 05, 2004 at 05:09 UTC
    Perl::Improved will be no more. At least not on Perl Monks.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl::Improved Volume 0, Number 1
by ysth (Canon) on Sep 06, 2004 at 20:52 UTC
    The root node should not have been reaped. I don't think it qualified as "blatant trolls (egregiously offensive)" as required by What is consideration?.

    But there's much to criticize about it without even weighing the merit of the contents; it's composed of partially of Meditation-type material, partially of PMD, and partially off topic. If it had stuck to the first and those who replied had also (also applicable, perhaps even more so, to Volume 0 Number 0), it could have been a reasonably interesting discussion. The blame for this not happening lays with more than just Wassercrats.

      “…has been a resounding success… there have been 91 replies”
      “…there have been a few detractors. They're dumb."

      Maybe not egregiously offensive, but it is blatantly trolling. His only concern is the number of responses his posts get, and he doesn’t care about the content of the responses or providing a meaningful reply to them.

      It sure wasn't a blatant troll; that's what makes Wassercrats so effective. And maybe if people could be trusted to stop responding to him (and I'm not saying this from the high horse; I caved a few times myself), then the root node could have stood. Judging from the way the previous installment went, that was less than expectable. Do you honestly believe that letting the same thread unfold again would have provided anything valuable for the archives?

      There is a time for everything. There is a time to be patient and to mentor, and a long time it is, and there is a time to make judgements.

      Makeshifts last the longest.

        Do you honestly believe that letting the same thread unfold again would have provided anything valuable for the archives?
        You didn't stop it by reaping. If that had any effect it was to encourage Wassercrats to leave the monestary; I would rather see a flood of trollish posts than have reaping used for that kind of purpose.
Re: Perl::Improved Volume 0, Number 1
by Grygonos (Chaplain) on Sep 04, 2004 at 23:16 UTC
    You couldn't write safe code if your life depended on it.

    edit: now that the node is reaped this is taken out of context, my particular post should be reaped, as it was a post made out of frustration, and was in poor taste

    Considered: antirice Personal attack. PM exists due to an implicit belief that others can learn.
    Unconsidered: ysth enough keep votes - Keep/Edit/Delete: 10/1/27

    A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://388534]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found