Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^5: Ansi Perl

by dragonchild (Archbishop)
on Dec 27, 2004 at 15:27 UTC ( [id://417558]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Ansi Perl
in thread Ansi Perl

Actually, no. The first Anonymonk made the statement that, on its face, is identical to your rephrasing. However, taken in the context of the discussion, the implication is that C programs, due to their ANSI-ness, do not have upgrade issues. This is unlike Perl, as s/he states a little further on.

So, within the context of the Anonymonk's complete post, the argument being put forward is that every C program ever written will not have any problems should you upgrade the compiler. I put forth a counter-example by saying a piece of software from the second-largest software manufacturer has this exact problem.

I fully understand that there may be issues unrelated to the ANSI-compliance of the source or the compiler's understanding of that source. As you say, it may be a compiler bug (either as a problem or its existence being depended on). It may also be a library issue, where the library being depended on isn't ANSI-compliant.

Yet, none of those items were present in the discussion before you brought them up. Which brings me to the problem of generalizations, especially when based primarily on personal experience. You are welcome to engage in them, but be prepared for the counter-example.

Note: I am using the non-specific you. English doesn't distinguish between the specific you and the non-specific you, for which I apologize in advance for any confusion.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^6: Ansi Perl
by Anonymous Monk on Dec 27, 2004 at 15:49 UTC
    Considering the AM also wrote:

    The problem with unportable C code isn't because every coder is following the standard. The problem is coders targetting their compiler, and (ab)using its extensions.

    I don't think (s)he was claiming that no C program would have problems when upgrading the compiler. As I read the article, the AM meant that due to having standards, it is possible to write programs that won't break if the compiler is upgraded (assuming the compiler doesn't have bugs). With Perl, since there is no standard, you can only hope an upgrade won't break your program.

      With Perl, since there is no standard, you can only hope an upgrade won't break your program.

      Example?

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

        *blink*

        Are you suggesting you have never heard of programs broken because of an upgrade of Perl? Where do you live? Mars?

        Here's a goodie, which both shows the lack of standards, and the breakage of upgrades. Look at the following program:

        sub AUTOLOAD {print $AUTOLOAD} *foo = bar; foo ();
        Three questions:
        1. The program should print:
          1. main::foo
          2. main::bar
          3. Something else
        2. perl5.005_03 prints:
          1. main::foo
          2. main::bar
          3. Something else
        3. perl5.6.0 prints:
          1. main::foo
          2. main::bar
          3. Something else
        Without actually running the program, but with consultation of all the documentation that comes with Perl, and any version of the Camel you like, could you answer all questions correctly?

        Here's another program:

        my %hash = (foo => 'bar'); chop for values %hash; print values %hash, "\n";
        The program prints ba when run with 5.8.6, but it prints bar when run with 5.005_03. And that wasn't a bug fix.

        Third program:

        print 80.101.114.108;
        Prints 80.101114.108 in 5.005_03 and earlier, but prints Perl from 5.6.0 onwards. You might say that noone writes 80.101.114.108 in normal program, and that's true. But evalled computer generated code can.

        I'm not saying these examples are huge problems, and it takes a lot resources to fix. But breakage does happen. Over and over and over again. And it does take resources to find the breakage. And for large organisations running a myriad of programs, that is a problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://417558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-24 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found