Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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


Comment on Re: perltidy in PM posts
Re^2: perltidy in PM posts (read blues)
by tye (Cardinal) 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 perldoc.perl.org:

    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-09-17 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (58 votes), past polls