Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Perl is a very supple language, but it has its quirks. For instance, it isn't at all obvious that scalar keys %$some_hash returns the number of hash elements in constant time. (We had quite a thread on that one, complete with BrowserUK benchmarking). Nor is it obvious that die; (without any parameters) rethrows an exception. Somebody thought that $#some_array was an intuitive way of specifying the last index of an array, but it wasn't me. Nor do I think scalar @some_array is a particularly obvious way of saying "I want the size of the array". I could come up with quite a list of these oddities.

So perhaps the starting point is to say, "yes, there are parts that are difficult" and then maybe ask them to explain further. Once someone names specifics it is much easier to say "yeah, but that's bad practice and no longer recommended to new programmers". Or if they are talking about something that is hard but powerful, like regexes, one could say: "yes, that is hard, but it allows so much power in just a few keystrokes". And if they are in fact talking about some of the more arcane syntax, well, just agree, but point out that those are just one small part of a language. Every language has its awkwardness. Why, for example, in Java do I have to declare a whole class using boilerplate code just to have a closure?

The other part of their response "Perl only exists as long as Bio data is in text files" completely misses the point as to why Perl is the tool of choice. It isn't the file format that makes bio data text like - it is the gene sequences themselves. As long as RNA and DNA comes in chains, you will need regexes and as long as Perl is the regex processor of choice, it will have a use.


In reply to Re: What's it with Perl Syntax ?! by ELISHEVA
in thread What's it with Perl Syntax ?! by biohisham

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 wandering the Monastery: (8)
As of 2024-04-19 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found