Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?) Date: Mon, 14 Mar 2016 20:57:36 +0000 Lines: 30 Message-ID: References: <56e44258$0$1598$c3e8da3$5496439d@news.astraweb.com> <8737rvxs89.fsf@elektro.pacujo.net> <87y49muoh6.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de r4cQLyfn6kQk0phy7c8C+wk9gQsyU4oCv0zcpCZ/KWlw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'preferable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'statements': 0.09; 'subject:which': 0.09; 'exception': 0.13; 'suggest': 0.15; '20:12,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'switch.': 0.16; 'wrote:': 0.16; 'hacking': 0.18; 'language': 0.19; '>>>': 0.20; 'developer': 0.20; 'lawrence': 0.22; 'rid': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; "doesn't": 0.26; 'header:X -Complaints-To:1': 0.26; 'switch': 0.27; 'document.': 0.27; 'once,': 0.29; 'handled': 0.29; 'url:wiki': 0.30; 'everyone': 0.31; 'language.': 0.32; 'getting': 0.33; 'point': 0.33; 'functions.': 0.35; 'mine': 0.35; 'cases': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'virtual': 0.38; 'why': 0.39; "didn't": 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'mark': 0.40; 'some': 0.40; 'subject:The': 0.61; 'back': 0.62; 'charset:windows-1252': 0.62; 'our': 0.64; 'url:cgi': 0.66; 'friend': 0.81; 'attempt,': 0.84; 'pythonistas,': 0.84; 'ready-made': 0.84; 'avoided.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 80.234.129.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104858 On 14/03/2016 17:53, BartC wrote: > On 14/03/2016 17:17, Mark Lawrence wrote: >> On 13/03/2016 20:12, Marko Rauhamaa wrote: >>> BartC : >>> >>>> Exactly why having ready-made solutions is preferable to everyone >>>> hacking their own solutions to switch. >>> >>> A developer friend of mine once said insightfully that the point of OO >>> is getting rid of switch statements. IOW, most use cases for switch >>> statements are handled with virtual functions. >>> >>> The most significant exception in my experience is message decoding, >>> where switches/ifs cannot be avoided. > >> http://c2.com/cgi/wiki?SwitchStatementsSmell > > I get it. The author doesn't like switch statements! > You clearly didn't bother reading the document. I suggest you try again, and then attempt, just for once, to come back with some worthwhile comments. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence