Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
With regards to your angst about strings and numbers ... flip your thinking. You're worried about making a mistake and using a string or number where you shouldn't have and getting wonky results because of it. That's a valid worry and every single monk worth their salt has had it bite them in the ass, easily losing a day or two of working time.

So, we stop using Perl, right?

Naaah! Instead, consider the following points:

  1. Perl was initially designed to process "stuff". One of its most common uses is to handle CGI "stuff". Having worked with CGI stuff in C++, the http server will give you everything in strings. That would've gotten real annoying in C, but C++ had these neat overloaded operators for me, so I could add two strings together. Perl takes that idea and makes it better.
  2. Ever since I started working with Perl, especially OO Perl app development, my skill as a developer has improved. In some cases, by leaps and bounds. Perl lets you do (nearly!) anything you want. But, if you want to work with it three months from now or if you want to work with it in a remote-development group, you'd better do it intelligently. Because Perl doesn't force you to design, it lets you design better. It lets you make the mistakes, then allows you to do it right. This means that I (now) naturally name variables and structure programs so that the number / string issue, well, isn't an issue. :-)
  3. If the above points don't convince you, consider that there are thousands of extremely smart developers who wish that every language they have to work in has X feature from Perl. (For me, it's hashes and regexes and, yes, scalars.) I hate not being able to use hashes. I hate having to do the stupid book-keeping to know if I'm going to want a string or an int or a float or whatever. I know I'm not alone. Even if you don't understand it now, trust that we do and that you'll understand it very soon.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.


In reply to Re: Using "my" suppresses "Name used only once" warning? by dragonchild
in thread Using "my" suppresses "Name used only once" warning? by Wysardry

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 imbibing at the Monastery: (4)
As of 2024-04-19 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found