Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'languages,': 0.04; 'compile-time': 0.07; 'python': 0.09; 'declarations': 0.09; 'imply': 0.09; 'semantics': 0.09; 'typed': 0.09; 'variables,': 0.09; 'sat,': 0.15; "(i'm": 0.16; 'easier.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'googled': 0.16; 'them...': 0.16; 'variable.': 0.16; 'wrote:': 0.17; 'passes': 0.17; 'variables': 0.17; 'jan': 0.18; 'variable': 0.20; 'pascal': 0.22; 'flexibility': 0.23; 'references': 0.23; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'url:wiki': 0.26; 'guess': 0.27; 'implemented': 0.27; 'right.': 0.27; 'message- id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'about.': 0.29; 'unlikely': 0.29; 'url:wikipedia': 0.29; 'no,': 0.29; 'that.': 0.30; 'error': 0.30; 'code': 0.31; "aren't": 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'compared': 0.35; 'exist': 0.35; 'faster': 0.35; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'url:org': 0.36; 'anything': 0.36; "i'll": 0.36; 'problems': 0.36; 'bad': 0.37; 'ok,': 0.37; 'systems,': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'url:en': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'decision': 0.60; 'most': 0.61; 'subject:...': 0.63; 'reverse': 0.65; 'subject': 0.66; 'forward': 0.66; 'url:htm': 0.71; '2013': 0.84; 'links:': 0.84; 'subject:very': 0.91; 'technique': 0.93 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:to :content-type; bh=ujo4/jKfod1oi1ZQKMWgXbxJs4uu4X/dKUY5Gcuv2O0=; b=Nm/bISx0BE7DjRloJXN6H+sXGIokoyylgeKMePh65bBnZdTeGz0DWdh/EF5Ag5Ztln aJh8cXnH0cnDHbkebJ0Md3pos3yjwxEfswi0Q/3o97bmW8KoRjEp0QrlqS8owHT2UB9z 6gubYfmO2WAenkIhSKzRJ6REMki+bhf79/1yWqsSR8uu9swZ+IxGe2oCVs6UaC7etowJ Itg383h3cx619EMAYitVS1O158OEVZZJ5pFpsOHDCvSdA7x/raXPtJo5RldNkb9AWHB2 xGOjKzdvzDnyXcIrNOOea68A6sSTz30eJD6lThdVNQPAx7g/ipbeb5foLHVwpEg/vSoK 9Anw== MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 5 Jan 2013 22:47:17 +1100 Subject: Re: pygame - importing GL - very bad... From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357386440 news.xs4all.nl 6870 [2001:888:2000:d::a6]:44666 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36159 On Sat, Jan 5, 2013 at 9:49 PM, someone wrote: > Ok, I think you're right. At least I find that C-compilers catches many > errors/warnings which python don't say anything about. But also C require me > to define/declarer the types of variables before I use them... OTOH I guess > I like that python is faster to code in, compared to C... C has typed variables, so it's a compile-time error to try to put any other type into that variable. Python doesn't. That flexibility comes at the cost of error-catching. There are hybrid systems, but in general, type declarations imply variable declarations, and that's something that Python doesn't want. (I'm of the opinion that declarations aren't such a bad thing; they make some aspects of scoping easier. However, that's a design decision that Python is as unlikely to reverse as indentation-defined blocks.) > Ok, I'll look forward to that. Recently I had some problems with > pass-by-value vs pass-by-reference. I googled the problem and found that by > default python passes by reference. No, it doesn't. You can find good references on the subject in various places, but call-by-reference as implemented in Pascal simply doesn't exist in most modern languages, because its semantics are way confusing. The name given to this technique varies; here's a couple of links: http://effbot.org/zone/call-by-object.htm http://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_sharing ChrisA