Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46521
| X-Received | by 10.224.200.202 with SMTP id ex10mr4729244qab.8.1369936753844; Thu, 30 May 2013 10:59:13 -0700 (PDT) |
|---|---|
| MIME-Version | 1.0 |
| X-Received | by 10.182.236.195 with SMTP id uw3mr56025obc.31.1369936753736; Thu, 30 May 2013 10:59:13 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ch1no2958254qab.0!news-out.google.com!y6ni57333qax.0!nntp.google.com!ch1no2958249qab.0!postnews.google.com!qn4g2000pbc.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Thu, 30 May 2013 10:59:13 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | qn4g2000pbc.googlegroups.com; posting-host=59.95.23.199; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui |
| NNTP-Posting-Host | 59.95.23.199 |
| References | <CAGVx7UWXAFHSHq37Ep-Vk=cM2wYrEGHSUhNc8s43bCvj_VcVow@mail.gmail.com> <mailman.2374.1369852683.3114.python-list@python.org> <51a6ef42$0$11118$c3e8da3@news.astraweb.com> <mailman.2397.1369904083.3114.python-list@python.org> <503a1a1e-9c5c-4c01-929b-673421907ab8@ys5g2000pbc.googlegroups.com> <mailman.2434.1369934893.3114.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-HTTP-UserAgent | Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0,gzip(gfe) |
| Message-ID | <034f2ffa-6bb3-453a-a0f2-b90ecafcda1e@qn4g2000pbc.googlegroups.com> (permalink) |
| Subject | Re: How clean/elegant is Python's syntax? |
| From | rusi <rustompmody@gmail.com> |
| Injection-Date | Thu, 30 May 2013 17:59:13 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| Xref | csiph.com comp.lang.python:46521 |
Show key headers only | View raw
On May 30, 10:28 pm, Chris Angelico <ros...@gmail.com> wrote:
> On Fri, May 31, 2013 at 3:12 AM, rusi <rustompm...@gmail.com> wrote:
> > You associate the primal (f)act of thinking about programming with
> > *doing* the generating.
> > By contrast the functional programmer thinks about what *is* the
> > result.
>
> I wish you'd explain that to my boss :) He often has trouble
> understanding why sometimes I put two syntactic statements on one
> line, such as:
>
> for (int i=0;i<nfoo;++i) if (foo[i].marker)
> {
> //do something with foo[i]
>
> }
>
> In Python, that would probably be done with a list comprehension or
> some other form of filtered iteration, and is to my mind a single
> operation - "iterate over all the marked foo" is just as much a valid
> loop header as "iterate over all the foo". This is a simple example,
> and what you say about thinking about what *is* the result doesn't
> really translate well into a C++ example, but the broader concept
> applies: there's a difference between code as the compiler/interpreter
> sees it and code as the programmer sees it, and there is not always a
> 1:1 correspondence of statements.
>
> ChrisA
I had a blog post about line-length in programs
http://blog.languager.org/2012/10/layout-imperative-in-functional.html
followed by an interesting discussion on the haskell mailing list
http://groups.google.com/group/haskell-cafe/browse_thread/thread/f146ec7753c5db56/09eb73b1efe79fec
The comment by Alexander Solla was insightful and is probably what you
are saying.
[Probably!! I am not sure what you are saying!]
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: How clean/elegant is Python's syntax? Ma Xiaojun <damage3025@gmail.com> - 2013-05-30 02:37 +0800
Re: How clean/elegant is Python's syntax? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-30 06:18 +0000
Re: How clean/elegant is Python's syntax? Ma Xiaojun <damage3025@gmail.com> - 2013-05-30 16:54 +0800
Re: How clean/elegant is Python's syntax? rusi <rustompmody@gmail.com> - 2013-05-30 10:12 -0700
Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-05-31 03:28 +1000
Re: How clean/elegant is Python's syntax? rusi <rustompmody@gmail.com> - 2013-05-30 10:59 -0700
Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-05-31 04:22 +1000
Re: How clean/elegant is Python's syntax? Ma Xiaojun <damage3025@gmail.com> - 2013-05-31 01:46 +0800
Re: How clean/elegant is Python's syntax? Chris Angelico <rosuav@gmail.com> - 2013-05-31 03:50 +1000
Re: How clean/elegant is Python's syntax? Ma Xiaojun <damage3025@gmail.com> - 2013-05-31 01:50 +0800
Re: How clean/elegant is Python's syntax? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-30 19:36 +0000
Re: How clean/elegant is Python's syntax? Michael Torrie <torriem@gmail.com> - 2013-05-30 17:30 -0600
csiph-web