Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: perltidy in PM posts

by ansh batra (Friar)
on Nov 23, 2011 at 04:19 UTC ( #939589=note: print w/replies, xml ) Need Help??

in reply to perltidy in PM posts

first of all this topic belong to PerlMonks Discussion
and secondly some sections like Obfuscation would loose their beauty with perltidy
rest it would be a great thing and also help full to the newbies like me if it is implemented

Replies are listed 'Best First'.
Re^2: perltidy in PM posts (read blues)
by tye (Sage) on Nov 23, 2011 at 07:45 UTC

    Not to criticize you, ansh batra, but just to, I hope, inform you a little and perhaps amuse you, simply because I enjoyed your comment about newbies the most of the comments so far... :)

    Yes, syntax highlighting certainly makes things easier to understand for newbies. Consider perlop. This excerpt would just be so much harder to understand if I hadn't copied the "syntax highlighting" from

    The fact that the only text within sight that is blue is the three '$' characters (I'm sorry, I should have made that dollar sign that I just typed blue; I'm sure I've confused most of the newbies now) clearly indicates something that newbies would not have understood without the clarion indicator of "blueness" (every newbie knows what blue means in that context; that goes without saying).

    But that pales in comparison to the boundless clarity that is only possible by having the red parts be red.

    The indentation getting a bit wonky in a couple of places is such a small price to pay for these huge leaps in clarity of the text.

    On a serious note, if you want to know about syntax highlighting at PerlMonks, then there are several facilities provided for searching for such things.

    I'm sure somebody will soon post links to no small number of previous discussions. (Ah, yes, as I expected, this happened before I even finished composing this.)

    In the mean time, I'll summarize: If you want colors assigned to things based on some algorithm that clearly fails when it tries to parse some Perl code and fails even more interestingly when it tries to parse things that aren't Perl code as if they were Perl code (or if you want to go the stackoverflow route of assigning colors based on some vague feel of "bits of syntax that are somewhat common to more than one programming language"), then you need to pick the poison of your choice and impose it upon yourself. And that isn't particularly hard. I'm sure some of the linked threads even provide instructions (but I didn't check).

    Though, if anyone still thinks that either of those approaches won't often decrease clarity, then I suspect that mostly means that they don't pay all that much attention much of the time. (:

    BTW, the perldoc example is just something I stumbled upon last week. I wasn't even looking for examples of "syntax highlighting gone wrong". I run into those often enough without looking for them and that's even though I never use syntax highlighting by choice.

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939589]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2017-03-29 06:40 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (344 votes). Check out past polls.