Re: OT: Why is C so popular?

From: Ron Johnson (ron.l.johnson_at_cox.net)
Date: 08/30/03

  • Next message: Jacob Anawalt: "Re: OT: Why is C so popular?"
    To: Debian-User <debian-user@lists.debian.org>
    Date: Sat, 30 Aug 2003 00:28:24 -0500
    
    

    On Fri, 2003-08-29 at 20:58, Pigeon wrote:
    > On Fri, Aug 29, 2003 at 04:44:33PM -0700, Steve Lamb wrote:
    > > On Fri, 29 Aug 2003 20:01:23 +0100
    > > Pigeon <jah.pigeon@ukonline.co.uk> wrote:
    > > > Oh, that's interesting - the for loop's running from 0 to 9, so it
    > > > prints "81", not "100".
    > >
    > > Yes, range(x) does 0 to x-1. This is for stuff like this (and this is a
    > > bad example)...
    > >
    > > for x in range(10):
    > > baz[x] = foo[x] + bar[x]
    >
    > ...so array indices work like C, then. OK!

    Python is written in C (no surprise there!), but what is surprising
    to some is that so many C-isms are in Python. For example:
        IF FOO == BAR:
            PRINT 'YES'

    Also, many modules are full of methods that are nothing but wrappers
    around C library calls, and thus have roughly the same parameter
    lists and calling sequences.

    -- 
    -----------------------------------------------------------------
    Ron Johnson, Jr. ron.l.johnson@cox.net
    Jefferson, LA USA
    4 degrees from Vladimir Putin
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Jacob Anawalt: "Re: OT: Why is C so popular?"

    Relevant Pages

    • Re: domain featured in OReilly book, available now
      ... Python", is available] ... it has a higher likelihood of meaning ... Imagine my surprise some years ago when I found out that the quite ... was a quite common mayan word (a dialect ...
      (comp.lang.python)
    • Re: Magic methods in extension types
      ... I'm surprised at your apparent surprise, ... (I appreciate Python for its ... ability to hide unimportant low-level details, not for it being a C ... implementing extension types look more like implementing Python types. ...
      (comp.lang.python)
    • Re: Artifical Life - a job for someone else
      ... but this uses curses so doesn't work on ... CAGE to PythonCard; I don't know how far he got or whether it eventually ... But even if neither of those things interest you, there _is_ a Python ... checked CAGE out in it and found to my pleasant surprise that it worked ...
      (comp.lang.python)
    • Re: Delphi kicks C# butt
      ... brade wrote: ... > most ground in August was PHP followed by Python. ... > much of a surprise due to the recent release of PHP 5. ... -Michael Bennett ...
      (borland.public.delphi.non-technical)