Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'algorithm': 0.04; 'languages,': 0.04; 'subject:Python': 0.06; 'c++,': 0.07; 'bindings': 0.09; 'run,': 0.09; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; 'wrote': 0.14; 'language.': 0.14; 'mostly': 0.14; "(it's": 0.16; '80s': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hardware.': 0.16; 'subject:programming': 0.16; 'successor': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'written': 0.21; 'preferred': 0.22; 'cc:addr:python.org': 0.22; 'library,': 0.24; 'why.': 0.24; '(or': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'am,': 0.29; "doesn't": 0.30; 'dec': 0.30; 'needed.': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'critical': 0.32; 'run': 0.32; 'fri,': 0.33; 'programmers': 0.33; 'maybe': 0.34; 'could': 0.34; 'basic': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'c++': 0.36; 'done': 0.36; 'next': 0.36; "didn't": 0.36; 'level': 0.37; 'performance': 0.37; 'growing': 0.38; 'problems': 0.38; 'enough': 0.39; 'how': 0.40; 'even': 0.60; 'algorithms': 0.60; 'slowly': 0.60; 'most': 0.60; 'making': 0.63; 'high': 0.63; 'skip:n 10': 0.64; 'teach': 0.65; '20,': 0.68; 'answer.': 0.68; 'viable': 0.84; 'to:none': 0.92; 'imagine': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=3Lu7Sb1qO2Qix4HvgrBE+tYy0EmWac61FvNyeCdMDZo=; b=auxrcMo91KSXOTHO3sE3UP5kCgYVqxj9MKYZ0wpa85Uk1aC+6MnW5ck0F3wBTrKe+N A+xQDA9PMePS9r+7PakXkA3Z/+U8WYtatlgOMebW7Glcn0TVJ9J18rkMLxpR5HUpLYwt bLgsmxvH7GPGm3jxHP4oUJgLUtW3EDmkQO/Um+jt48aCjyzsjRvVYj9UU007pI3qMPzI TuviBYRdiLu41qRBKQA1MuW9qN79eQ+ICi2QR4K9+eeDycuBznEBS4sV2LCYzgO1rIEU ZT6DZ6SiQUAjJ2SI3sE+qx/IX8wRAgB4awUEqcv5KltTL2s6Kz47eeBP3zg8dzHSiwQo YtQQ== MIME-Version: 1.0 X-Received: by 10.66.164.136 with SMTP id yq8mr3020894pab.67.1387474120311; Thu, 19 Dec 2013 09:28:40 -0800 (PST) In-Reply-To: <52b328f7$0$6512$c3e8da3$5496439d@news.astraweb.com> References: <20131212213602.806ef8fd2626ca6f34bc83d6@gmx.net> <20131216213225.2006b30246e3a08ee241a191@gmx.net> <20131217165144.39bf9ba1cd4e4f27a96893ca@gmx.net> <52b0fb4f$0$29973$c3e8da3$5496439d@news.astraweb.com> <52b15a69$0$29973$c3e8da3$5496439d@news.astraweb.com> <52b328f7$0$6512$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 20 Dec 2013 04:28:39 +1100 Subject: Re: Experiences/guidance on teaching Python as a first programming language From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387474129 news.xs4all.nl 2863 [2001:888:2000:d::a6]:59730 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62411 On Fri, Dec 20, 2013 at 4:12 AM, Steven D'Aprano wrote: > But why is so much non-performance critical code written in C? Why so > many user-space applications? Very good question! I don't have an answer. There are a few "maybe-answers", but they mostly come down to "programmer didn't know of a viable alternative". When I wrote RosMud, I wrote it in C++, because I was making tweaks to an existing C++ program (Gmud) and because I thought that that was the way to make it run fast enough for what I needed. Seven years on (or will be, come January), I've learned how much can be done in Python, Pike, and other high level languages, and RosMud's successor is not written in C. Maybe part of the answer comes from people who've learned based on old hardware. Growing up in the 80s on an Epson XT-clone, I wrote code in BASIC, C, and assembly. Now, most of my performance problems in BASIC were because of flawed algorithms (it's amazing how slowly an O(n*n) algorithm will run, isn't it!), but I could imagine someone growing up learning "C is the only way to make code run fast" and then going on to teach the next generation of programmers to use C, without necessarily even explaining why. But that's just speculation. All I know is, even if you do need to write in C for some reason (your preferred language doesn't have bindings for some library, maybe), chances are you can write the tiniest bit of code that way, and do the rest in a high level language. ChrisA