Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43454

Re: Functional vs. Object oriented API

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <msirenef@lightbird.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.017
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'patterns': 0.04; 'static': 0.04; 'class,': 0.07; 'coding,': 0.09; 'python:': 0.09; 'python': 0.11; 'mouth.': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'roy': 0.16; 'screen,': 0.16; 'subject:API': 0.16; 'subject:Object': 0.16; 'subject:oriented': 0.16; 'wrote:': 0.18; 'do.': 0.18; 'trying': 0.19; 'later': 0.20; 'coding': 0.22; 'header:User-Agent:1': 0.23; 'dinner': 0.24; 'skip:l 30': 0.24; 'initial': 0.24; 'java': 0.24; 'looks': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'room': 0.29; 'said,': 0.30; "i'm": 0.30; 'code': 0.31; 'hacker': 0.31; 'received:192.168.1.3': 0.31; 'class': 0.32; 'open': 0.33; 'noticed': 0.34; 'could': 0.34; "can't": 0.35; 'classes': 0.35; 'knows': 0.35; 'but': 0.35; 'really': 0.36; 'bought': 0.36; 'method': 0.36; 'being': 0.38; 'problems': 0.38; 'initially': 0.38; 'somebody': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'around.': 0.60; 'everybody': 0.60; 'interview': 0.61; 'kind': 0.63; 'real': 0.63; 'soon': 0.63; 'our': 0.64; 'more': 0.64; 'worth': 0.66; 'subject:. ': 0.67; 'smith': 0.68; 'walk': 0.74; 'applicants': 0.83; 'giveaway': 0.84; 'investment.': 0.84; 'absolutely': 0.87; 'regret': 0.91
Date Fri, 12 Apr 2013 10:29:45 -0400
From Mitya Sirenef <msirenef@lightbird.net>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
MIME-Version 1.0
To python-list@python.org
Subject Re: Functional vs. Object oriented API
References <mailman.429.1365635789.3114.python-list@python.org> <51678b94$0$29977$c3e8da3$5496439d@news.astraweb.com> <roy-E3B2B9.10194712042013@news.panix.com>
In-Reply-To <roy-E3B2B9.10194712042013@news.panix.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.522.1365776990.3114.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365776990 news.xs4all.nl 2619 [2001:888:2000:d::a6]:59268
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43454

Show key headers only | View raw


On 04/12/2013 10:19 AM, Roy Smith wrote:
> As part of our initial interview screen, we give applicants some small
> coding problems to do.  One of the things we see a lot is what you could
> call "Java code smell".  This is our clue that the person is really a
> Java hacker at heart who just dabbles in Python but isn't really fluent.
> It's kind of like how I can walk into a Spanish restaurant and order
> dinner or enquire where the men's room is, but everybody knows I'm a
> gringo as soon as I open my mouth.
>
> It's not just LongVerboseFunctionNamesInCamelCase().  Nor is it code
> that looks like somebody bought the Gang of Four patterns book and is
> trying to get their money's worth out of the investment.  The real dead
> giveaway is when they write classes which contain a single static method
> and nothing else.
>
> That being said, I've noticed in my own coding, it's far more often that
> I start out writing some functions and later regret not having initially
> made it a class, than the other way around.


I've absolutely noticed the same thing for myself, over and over
again. I can't remember writing a class that I've regretted is not
a few functions, although it must have happened a few times.   -m


-- 
Lark's Tongue Guide to Python: http://lightbird.net/larks/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Functional vs. Object oriented API Max Bucknell <mpwb500@york.ac.uk> - 2013-04-11 00:16 +0100
  Re: Functional vs. Object oriented API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-12 04:20 +0000
    Re: Functional vs. Object oriented API Roy Smith <roy@panix.com> - 2013-04-12 10:19 -0400
      Re: Functional vs. Object oriented API Mitya Sirenef <msirenef@lightbird.net> - 2013-04-12 10:29 -0400
      Re: Functional vs. Object oriented API David M Chess <chess@us.ibm.com> - 2013-04-12 11:37 -0400
        Re: Functional vs. Object oriented API 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-12 22:25 -0700
        Re: Functional vs. Object oriented API 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-12 22:25 -0700
  Re: Functional vs. Object oriented API Rui Maciel <rui.maciel@gmail.com> - 2013-04-13 09:51 +0100

csiph-web