At work, I just rewrote a bunch of ruby code, moved piles of things around. It's changing some ordinary synchronous code to use EventMachine, something that's kind of like POE. I just found out writing in ruby is like perl, but with
no strict 'vars';on all the time.. This major time saver isn't available at all! Even worse, whenever I typo a variable or forget to introduce it properly it's automatically turned into a method call.
W
T
F
Perl works to save my bacon and would never let me get away with typoing a variable or forget to introduce it. It's giganto times more efficient to program in Perl than Ruby.I hate this problem, and Python has it, too, to a lesser extent.
I wrote about it from a different angle here: http://rjbs.manxome.org/rubric/entry/1673
My observations over many years are that the only people who have problems with the lack of strict variables are Perlers who are new to Ruby, and who are still writing monolithic top-down scripts. It's really a non-issue in practice. Running with -w helps, too. It sure beats the heck out of typing 'my' everywhere.
Re:Strange
Aristotle on 2009-07-15T01:22:56
who are still writing monolithic top-down scripts.
Oh really? So you think Joshua and me are the kind of people who write spaghetti monoliths in Perl? So far I’ve seen this complaint only from Perl programmers I considered competent. Maybe that’s because only competent Perl programmers have come to take the protection of strictures for granted? Just a possible alternative interpretation of the… well, it’s not data, it’s just anecdotes.
with any kind of reasonable test suite. […] sure beats the heck out of typing ‘my’ everywhere
You know, I’ll gladly type three extra characters every half-dozen lines if it means I don’t have to write a whole test case and manually suss out the source of its failure before I spot a mistake. You can do it the other way around if that’s what you prefer.