Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Perl 5 interpreter

by BrowserUk (Pope)
on Jan 12, 2011 at 08:51 UTC ( #881846=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl 5 interpreter
in thread Perl 5 interpreter

Ah yes. The spectre and drogue of backward compatibility.

Does Perl really need to support a 21 year old standard that was superceded 11 years ago?

How many people are still confined, other than by choice, to using a C89 only complier?


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.


Comment on Re^4: Perl 5 interpreter
Re^5: Perl 5 interpreter
by Anonymous Monk on Jan 12, 2011 at 08:54 UTC

    Even if they are no longer using it, I don't think rewriting is an option which porters would consider.

    I mean fixing this would take too much effort but no visible benefit to the end user.

Re^5: Perl 5 interpreter
by Corion (Pope) on Jan 12, 2011 at 08:55 UTC

    If "by choice" you mean "the C compiler that my OS vendor uses", I guess too many, especially for OSes that you pay real money for :-)

    I think there are some macros that you can't conveniently elide, like dTHX, which expands to "the current thread context" if Perl is compiled with iThreads and "nothing" if threads are not compiled (but you know that). I'm not sure whether having inlined functions is much better, structurally, than having the macros.

      21 years is as near as damn it half the life of the industry.

      Can you imagine if say the car industry was still used technology from its half life? Cross-ply tyres, drum brakes and 3-speed gearboxes on your latest car?

      How about planes with canvas and dope wings and piston engines?

      Where would we be if the electronics industry still required the use of discrete transitors?


      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.
        I think it all boils down cost of running them Vs Cost of replacing them. OTOH breaking backwards compatibility won't do good for Perl PR.
        21 years is as near as damn it half the life of the industry. Can you imagine if say the car industry was still used technology from its half life?

        Well, actually the car industry is a good example where C89 is still in use.

        There is a lot of software in modern cars, and most is written in C. One of the requirements of the car-manufactors is that the software uses a safe subset of C. And this safe subset is defined by a de-facto standard called MISRA-C (Guidelines for the use of the C-language in critical systems). The current version of it is MISRA-C:2004. In the foreword of that standard you can read:

        While producing MISRA-C:2004 the question of addressing the 1999 C standard arose. At this time only issues with MISRA-C:1998 are addressed due to limited support for C99 on embedded microprocessors.

        So even if current cars contain high-tech features, those features are implemented using an 21-year-old-standard.

        Backward compability to C89 is not as absurd as it seems!

        Rata

        The car industry still uses the same bolts (i.e. same dimension and shape) to fix wheels it used 21 years ago (AFAIK). And probably for the same reason, backwards compatibility/standard compliance

        Can you imagine if say the car industry was still used technology from its half life?

        Trivia-of-the-Day: The Schrader valve, patented in the 19th century, is still used in its original form on cars today (at least in North America). Depending on the model, your car may easily have a half-dozen of them and is unlikely to have fewer than four.

Re^5: Perl 5 interpreter
by moritz (Cardinal) on Jan 12, 2011 at 09:10 UTC

    Does Perl really need to support a 21 year old standard that was superceded 11 years ago?

    How many people are still confined, other than by choice, to using a C89 only complier?

    FWIW the parrot developers had a similar discussion recently, and decided not to switch to full C99, because MSVC doesn't support that. But they switched to a C99 subset that most compilers understand. They might value developer sanity higher than support for legacy platforms, at least compared to p5p.

      Sounds like a sane approach.

Re^5: Perl 5 interpreter
by Tux (Monsignor) on Jan 12, 2011 at 16:06 UTC

    I do, on a daily basis.

    First reason is that on those (proprietary) OS's there is no (more) update available for the ANSI C89 compiler.

    Second reason is that GNU folk do not consider OS's other than Linux worthwhile caring for. E.g. on HP-UX PA-RISC (10.20, 11.00, 11.11 and 11.23) it is impossible to create a GNU gcc-4.x.x that compiles reliable in 64bit mode, so I'm stuck to version 3.4.6.

    GNU gcc is a nightmare to compile on e.g. HP-UX 11.23 or 11.31 if all of your system is set up to be 64bitall only. GNU gcc folk claim the compiler just needs a 32bit environment to build a compiler that can generate 32bit and 64bit objects, but in order to get that compiler compiled, you need a 32bit environment and - at current - THREE extra packages installed (gmp, mpfr and mpc) that all need a gcc compiler to get compiled properly -> endless loop of FAIL. On these I stopped porting with gcc-4.2.4.

    Third reason is that (maybe because of reason 2), code generated with HP C-ANSI-C compiler runs up to 15% faster than when compiled with GNU gcc, so the option to use a gcc compiler just because it can do C99 is not a very obvious one. I bet inlining functions won't get a 15% speed gain ove macros, but I didn't check that.


    Enjoy, Have FUN! H.Merijn

      You couldn't use gcc 4.5.2 for HP-UX for instance?


      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.

        That one is only available on the more modern OS versions for which HP's C-compiler already is C99 compliant. I'm also running/testing/porting on 10.20, 11.00 and 11.11 (all PA-RISC), for which neiher HP nor HP's porting center has gcc-4.5.2 avilable.

        Besides that, objects compiled by gcc are still running slower than when compiled with HP C-ANSI-C.


        Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-08-23 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls