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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
but I saw recent threads of someone showing Python code and saying "You see : it's much more clearer without all those $ and % everywhere!"

As is often the case, perceptions and preferences are influenced by what you already know.

My first (high level) programming language was a dialect of BASIC that uses $ as a sigil for variables. Also, many Linux/Unix/POSIX command shells, such as bash, ash, csh, sh and more, use $ the same way. I also learned C.

So, given Perl syntax is very similar to C syntax and I was already used to using sigils in shell scripts, learning Perl was comfortable and easy for me.

Python, however, uses whitespace as punctuation. While some would argue that forcing programmers to correctly indent their is s good thing, BUT, whitespace is a minefield of trouble (what you see is not necessarily what it appears to be). Hopefully, Python's parser now includes detection of "mixed whitespace" and will issue a warning when detected.

Aside from "whitespace as syntax", Python syntax differs in other subtle ways that make it less comfortable for me than Perl.


In reply to Re^3: Writing a Perl extension framework for Inkscape by RonW
in thread Writing a Perl extension framework for Inkscape by fdesar

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-16 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found