in reply to Re^6: Static typing is mostly a waste of time
in thread Static typing is mostly a waste of time

Interesting argument. The difference is that I cannot reconsitute the original value to any degree. If I convert from a double to an int and back again, I still have the same value (albeit with rounding errors). Same thing between chars and longs, etc. With Perl, if I apply scalar context to an array, I cannot retrieve the original array in any way.
  • Comment on Re^7: Static typing is mostly a waste of time

Replies are listed 'Best First'.
Re^8: Static typing is mostly a waste of time
by Anonymous Monk on Apr 13, 2005 at 17:59 UTC
    #include<stdio.h> main() { char scalar; void *tmp; char *arr = "abcde"; scalar = arr; //convert array to scalar tmp = scalar; arr = tmp; //convert scalar back to array to see if we can //retrieve the original array in any way printf("%s\n",arr); //Whoops, Segfault. Can't reconsitute. }
Re^8: Static typing is mostly a waste of time
by Anonymous Monk on Apr 13, 2005 at 18:23 UTC
    I love Perl. You love Perl. Millions of people love and enjoy Perl. It can be used sucessfully for a myriad of different tasks. People can make money using Perl. Perl takes what is good from other languages, and omits the bad. Perl is pragmatic. Perl is popular. Perl is good. But can we admit that any attempt at describing Perl's type system as anything other than an ad-hoc mess is bound to result in inconsistancy and frustration?
      I think you are right, which is frustrating to me for some reason. *shrugs* Oh, well.
        Once you accept it, its actually liberating. Now when you meet someone who complains about Perl not being theoretically pure, you can respond "You're right. But I manage to productive with it anyway." And you can move along to bigger and better things.