Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90328
| References | <e3725c9b-9f03-494a-a6a3-9d089f4f129c@d32g2000yqh.googlegroups.com> <d44977dc-2473-46e6-914c-1b218f32af85@d36g2000prb.googlegroups.com> <56a4cc19-a6c1-4c55-873f-e944d4ad9165@googlegroups.com> |
|---|---|
| Date | 2015-05-11 12:00 +1000 |
| Subject | Re: Confessions of a Python fanboy |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.335.1431309617.12865.python-list@python.org> (permalink) |
On Mon, May 11, 2015 at 11:46 AM, zipher <dreamingforward@gmail.com> wrote: >> > 3.) true OOP >> > Now before you go and get all "huffy" over this statement, hear me >> > out. Python is the best language in the world. But it damn sure has >> > some warts! "len(this)" instead of "obj.length" max(that) instead of >> > [1,2,3,4,5].max(). >> >> As the Zen says: '[P]racticality beats purity'. Personally, I'm not >> sure how a handful of convenient built-in functions make a language in >> which _everything is an object_ somehow "false" OO. >> >> If you're really that concerned with writing "true" OO (for some >> wildly variable value of "true"), there's nothing stopping you from >> doing so now: >> >> obj.__len__() > > The issue is that Python currently blurs a very powerful conceptual boundary in CS -- between the abstract space where objects and variables are held and the concrete underlying machine. > > By having methods like len() in your built-in namespace when it's really only relevant to objects that are types of containers, you blur one primary component of OOP: encapsulation. > Please take care of your quoting. You just quoted two other posts, and I have no idea who said things without going and digging in the archive. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Confessions of a Python fanboy zipher <dreamingforward@gmail.com> - 2015-05-10 18:46 -0700
Re: Confessions of a Python fanboy Chris Angelico <rosuav@gmail.com> - 2015-05-11 12:00 +1000
Re: Confessions of a Python fanboy zipher <dreamingforward@gmail.com> - 2015-05-10 19:11 -0700
Re: Confessions of a Python fanboy Chris Angelico <rosuav@gmail.com> - 2015-05-11 12:18 +1000
OFFTOPIC, WAS Re: Confessions of a Python fanboy zipher <dreamingforward@gmail.com> - 2015-05-10 19:27 -0700
Re: OFFTOPIC, WAS Re: Confessions of a Python fanboy Ben Finney <ben+python@benfinney.id.au> - 2015-05-11 12:41 +1000
Re: Confessions of a Python fanboy Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-11 16:15 +1000
Re: Confessions of a Python fanboy Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-11 07:31 +0100
csiph-web