From 3834696499157391552
X-Google-Thread: 7894ca11fe,d47b345505a72a70
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.alt.net!frodo.cs.rpi.edu!not-for-mail
From: Ron <ron.natalie@gmail.com>
Newsgroups: comp.std.c++
Subject: Re: for-else: adding else to for loops
Date: Fri, 14 Aug 2009 12:44:50 CST
Organization: http://groups.google.com
Lines: 23
Sender: cppmods@cs.rpi.edu
Approved: austern@google.com
Message-ID: <9e9c2ca5-78eb-460c-adec-2ec051c54210@r18g2000yqd.googlegroups.com>
References: <5d82cd6c-2a22-4dd7-8c7d-790b579533ea@d15g2000prc.googlegroups.com>
NNTP-Posting-Host: netlab.cs.rpi.edu
Content-Type: text/plain; charset=ISO-8859-1
To: (Usenet)
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
X-Original-Date: Fri, 14 Aug 2009 07:52:49 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Xref: g2news2.google.com comp.std.c++:1283

On Aug 7, 1:56 pm, Jared Grubb <jared.gr...@gmail.com> wrote:
> I am both a Python and C++ developer, and there is one feature in
> Python that I've grown to appreciate, and that I wish C/C++ had. In
> Python, loops can have an else clause; the else clause gets executed
> when the loop condition fails (but not when the loop is exited via a
> break, return, or exception). For a dummy example:

In addition to the other points mentioned (breaking existing code),
the language
does not need any more horrendous structure violations.   The ones we
have existing
are sufficient.   Just because some other language likes to dish up
spaghetti is
no need to sully C++ further than it already is.



--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



