in reply to Re^7: Plz suggest what is the problem in the following code?
in thread Plz suggest what is the problem in the following code?

Runs fine when I rename main to mainx ... and like I said ... by convention/cargo-cult/angry-monkey I would never write a C shared library that redefined main (or didn't have the convention of prefixed method names) because unlike C++ (name mangling) or Java, the *possiblity* of symbol clashing is too great. Sure, there are ways around that but like I said cargo-cult.

-derby
  • Comment on Re^8: Plz suggest what is the problem in the following code?

Replies are listed 'Best First'.
Re^9: Plz suggest what is the problem in the following code?
by BrowserUk (Patriarch) on Feb 04, 2009 at 14:03 UTC
    I said ... by convention/cargo-cult/angry-monkey I would never write a C shared library that redefined main ... because unlike C++ or Java, the *possiblity* of symbol clashing is too great.

    And as I pointed out, the possibility of symbol clashing is no greater with the name "main" than it is with 'start' or 'new' or any other name.

    So, regardless of whether you would or wouldn't do it--that's your choice--the reasoning for not doing it is bogus! Being proud of cargo-cult doesn't make it more legitimate.


    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.

      Proud? Where did you get that from? Nothing could be farther from the truth. Obviously you've mistaken what I've written (or more than likely I did a poor job of writing) to construe that I would *continue* the practice.

      -derby