in reply to Re^3: Shouldn't JSON be faster?
in thread Shouldn't JSON be faster?

The point here is not old (and obsolete) OS's, but the compliance to ANSI C89 versus ANSI C99.

All of perl requires a ANSI C compliant compiler. Though it is not obvious everywhere, the requirement is a C89 compatible C compiler. That means that there is no guarantee whatsoever that you can build modules written for C99 minimum can be used with any version of perl.

There is a big difference. And I'm not pointing at differences between GNU gcc and expensive ANSI C compilers from the big players, but the simple fact the e.g. c++ style comments // is supported in C99, but is not in C89 is something basic that is VERY EASY to fix and doesn't have to change any other parts of the program.

It's not that the code is wrong. It is more courtesy to all perl users to comply to the minimal requirements of perl itself. I did send a patch to make that source C89 compliant, but it was rejected as "the code is already compliant to the standard" (and then deleted). It is indeed following the ANSI standard. Just a shame it follows the wrong one.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^5: Shouldn't JSON be faster?
by JavaFan (Canon) on May 31, 2010 at 12:53 UTC
    All of perl requires a ANSI C compliant compiler.
    CPAN != perl.
    That means that there is no guarantee whatsoever that you can build modules written for C99 minimum can be used with any version of perl.
    Irrelevant, as JSON::XS obviously can be build against perl. cpantesters only shows 1 fail, and almost 300 passes for its latest version, which is a pretty good record.
    I did send a patch to make that source C89 compliant, but it was rejected as "the code is already compliant to the standard" (and then deleted).
    Kudos for writing a patch. But it's the authors right to reject patches, for whatever reason. However, don't despair. The license of JSON-XS is "This module is licensed under the same terms as perl itself." Which means you can apply your patches, and distribute them. Feel free to put the modifications on CPAN and distribute them.
Re^5: Shouldn't JSON be faster?
by BrowserUk (Patriarch) on May 31, 2010 at 11:17 UTC
    compliance to ANSI C89

    1989 is 21 years ago. Ie. ancient. Your demands are ridiculous. The rest is just noise.

      C89 might be ancient, but Visual Studio still doesn't support C99 fully. Neither do some other vendor compilers. If you want to write portable C code, you either have to limit your supported compiler to GCC or avoid some C99 features.

        Since when has VS-compatibility been such a high priority for Perl development?

        Given that there are vast tracts of Perl source that need to be conditionally compiled for different OSs, the requirement that some gcc-enabled C99 syntax might need additional effort for VS is neither here nor there.

        That said, as of this month, even gcc doesn't do all of C99. But that's no good reason to restrict the use of features that have been common extensions to virtually every C compiler since long before C99 was ratified.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.