Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Most languages don't use sigils for their variables, and they aren't massively abandoned because they are 'cryptic'. Python and Java are often considered to be less cryptic language than Perl - which is often seen as quite cryptic, or even shell, which can be quite cryptic as well.
Which are the variables and which are the function words?
You know, if context cannot tell, and if you are only looking through a peephole (that is, seeing a few lines of code, and not a declaration of the variable or function), it usually doesn't matter. If one sees:
print foo;
in a language where parenthesis aren't required after a function call, it really doesn't matter whether foo is a variable, or a function. It's printing the value of foo.

In fact, understanding programming in general becomes a lot easier if you view scalars, arrays and hashes as functions. A scalar is just a function that returns a fixed value (although you can later change what the value is). An array is just a function that takes an integer as argument, while a hash is a function that takes a string as argument.

I find sigils handy because they allow me to do interpolation. But for me, that's their only use. It doesn't make programs more cryptic or less cryptic.


In reply to Re: Perl is more intuitive by Anonymous Monk
in thread Perl is more intuitive by kiat

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 about the Monastery: (7)
As of 2024-04-18 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found