Quote:
|
Quote:
|
Quote:
TIMTOWTDI is good since you can have more choice, BUT will lead to inconsistencies and sometimes problems that can be solved in the most obvious way become messy and obfuscated. This will happen in any language that follows this philosophy, not just Perl. |
Quote:
http://www.ibiblio.org/g2swap/byteof.../for-loop.html http://floppsie.comp.glam.ac.uk/Glam...ipting/19.html - both 'for' and 'while' loops exist, though conceptually only 'while' loop is necessary. |
Quote:
There should be one-- and preferably only one --obvious way to do it.. Read it carefully. If you don't understand English, look up the dictionary or thesaurus. Quote:
Let me fill you in if you are still clueless. Can you please look at my argument again on why Perl encourages inconsistencies. See post #17. I can find you some more in perlsyn: different ways to write for loops in Perl Code:
for ($i = 1; $i < 10; $i++){ } Code:
for ( ... ) in ( ... ): My illustrations support my point that TIMTOWTDI is good sometimes, as you can see from the Perl's different for loop syntaxes that programmers can have choices. But because of this, code is inconsistent. Lastly, its not just Perl , but any other languages with TIMTOWTDI philosophy will encounter this "issue". You may disagree for all i care, but that's how it is Its just one of my observation with regard to "TIMTOWTDI" after using Perl and Python for so many years. You don't have to really get so heat up with me about this. Now, can we stop? |
Quote:
... Look into C++ 'boost' library - IIRC they've implemented FOREACH a-la Perl - because people like it. I.e. people like to be able not to deal with numeric index while iterating over array. At all, look at other than Perl/Python languages - and then you will see that Perl simply borrowed a lot of ideas from them. For example, 'maxima' has a notion of current expression/variable: Code:
__ is the input expression currently being evaluated. That is, while an input expression expr is being evaluated, __ is expr. |
All times are GMT -5. The time now is 05:33 PM. |