Quote:
I am too lazy, but if to dig deeper, I'm sure I'll find in Python "there is more than one way to do it" in many more places. |
Quote:
tell me which one to you is obvious in these Perl statements (and don't try to evade this question as well). Code:
open FILE, '<', "foo.txt" or die "Can't open: $!"; Code:
if ( .... ) { Code:
if something : Sure you can find one of two Python's "more than one way to do it" , but when it comes to how many there are, Perl beats Python all the way. |
I suggest learning both. I haven't really tried Ruby much, maybe it's good. You can learn it too if you like.
And I agree with Sergei Steshenko's comment that you should read "Higher Order Perl" to really understand what it's all about. |
Quote:
Quote:
Quote:
|
Quote:
Quote:
don't give comments that are half truth and leave people guessing what it means next time. Nevertheless, you still didn't explain the "no way of indicating end function" statement. |
Quote:
Code:
#!/usr/bin/python Code:
Starting the function... |
Quote:
I guess everybody is different. If you have used Python for years and still couldn't get used to its style, then its not for you. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
http://utcc.utoronto.ca/~cks/space/b...honIndentation . At all, if I understand it correctly, the indentation may be whatever number of spaces, just returning to previous level of indentation must have the same number of spaces, i.e. Code:
foo_indent_level Here is a thread about an indentation error: http://bytes.com/topic/python/answer...nt-comphrehend - though the thread is not about 'break', I find the code unreadable because of the way 'break' (line #36, #39) is indented. And, if I understand it correctly, there is more than one way to select indentation of 'break'. |
Quote:
if you write it in Perl with good coding practice, Code:
foo_indent_level1{ Code:
foo_indent_level2{ Which one would you prefer ? A good Perl programmer would want to re-indent it nicely anyway. |
Quote:
I indent this way: Code:
if(...) Regarding "there is more than one way to do it" - just everything in programming after the Turing machine proves that there is more than one way to do it. |
Quote:
Quote:
I can't help it you don't see it that way, because that's your business and i can't be bothered. |
All times are GMT -5. The time now is 04:30 AM. |