Not "unlearning" per se, but just learning, and running into
problems with previous habits. Lots of things --- and in both
directions. Like you, it took me a little while before putting
symbols in front of variables was a habit. Of couse, now I can
usually count on throwing in a few @'s and $'s when I'm coding in C.
It also took me a while to really utilize the foreach loop rather
than the C-style for(;;) loop --- however, I also learned early *not*
to use foreach (1 .. 1000000), because it built the
whole list in memory. That was optimized to a counting loop (in 5.005).
It was rather easy to learn not to do it because there was a
penalty involved. Coming back to the foreach version
took longer because there is no real penalty for sticking with the C
version. Well, actually there is a minor penalty --- a suprising
number of people will prejudge you to somehow be a less competant Perl
programmer if you use the C-style loop rather than the more
"idiomatic" foreach version (even though it wasn't all that long ago
(prior to mid 1998 or so) when it wasn't always a good idea).
On the whole, picking up Perl with all it's idiosyncracies, funky
symbols, context sensitivity, statement modifiers and such wasn't
noticeably a problem. It's only when you need to go back to another
language that you *really* notice what's missing and have to
remember/relearn how to accomplish even relatively simple tasks :-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||