X-Received: by 10.224.65.6 with SMTP id g6mr7761733qai.4.1365830731437; Fri, 12 Apr 2013 22:25:31 -0700 (PDT) X-Received: by 10.50.214.36 with SMTP id nx4mr126142igc.6.1365830731285; Fri, 12 Apr 2013 22:25:31 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ca1no43277611qab.0!news-out.google.com!ef9ni31353qab.0!nntp.google.com!ca1no43277607qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Fri, 12 Apr 2013 22:25:30 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.192.32.215; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw NNTP-Posting-Host: 123.192.32.215 References: <51678b94$0$29977$c3e8da3$5496439d@news.astraweb.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Functional vs. Object oriented API From: 88888 Dihedral Cc: python-list@python.org Injection-Date: Sat, 13 Apr 2013 05:25:31 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:43502 David M Chess=E6=96=BC 2013=E5=B9=B44=E6=9C=8812=E6=97=A5=E6=98=9F=E6=9C=9F= =E4=BA=94UTC+8=E4=B8=8B=E5=8D=8811=E6=99=8237=E5=88=8628=E7=A7=92=E5=AF=AB= =E9=81=93=EF=BC=9A > > Roy Smith >=20 >=20 >=20 >=20 > > As part of our initial interview screen, we give > applicants some small=20 >=20 > > coding problems to do. =C2=A0One of the things we see a lot is what > you could=20 >=20 > > call "Java code smell". =C2=A0This is our clue that the > person is really a=20 >=20 > > Java hacker at heart who just dabbles in Python but isn't really fluent= . > =C2=A0 >=20 > > ... >=20 > > It's not just LongVerboseFunctionNamesInCamelCase(). =C2=A0Nor is > it code=20 >=20 > > that looks like somebody bought the Gang of Four patterns book and > is=20 >=20 > > that maybe there's a class struggling to be written. >=20 >=20 >=20 > And I think equally to the point, even if you have > only data, or only functions, right now, if the thing in question has tha= t > thing-like feel to it :) you will probably find yourself with both before > you're done, so you might as well make it a class now... >=20 >=20 >=20 > DC If it is not time-critical and no needs to convert into=20 CYTHON then it does not matter too much. But a well wrapped class structures with good documents can=20 help others to use the python codes a lot. If the part is intended to be time-critical in the low level=20 part, then avoiding seeking 4 levels of methods and properties inside a loop is helpful in python programs to be executed=20 in the run time.