From 4180908874746320747
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e92ba5a0251f1ca0
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-06-19 08:15:11 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: Michiel.Salters@cmg.nl (Michiel Salters)
Newsgroups: comp.std.c++
Subject: Re: C++0x Wish List (deprecate null statement)
Date: 19 Jun 2002 15:15:11 GMT
Organization: http://groups.google.com/
Lines: 33
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <cefd6cde.0206190346.697f276@posting.google.com>
References: <23b84d65.0206181331.3d79ce9b@posting.google.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Trace: posting.google.com 1024487170 12695 127.0.0.1 (19 Jun 2002 11:46:10 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 19 Jun 2002 11:46:10 GMT
Xref: archiver1.google.com comp.std.c++:12160

Allan_W@my-dejanews.com (Allan W) wrote in message news:<23b84d65.0206181331.3d79ce9b@posting.google.com>...
> The null statement is error-prone, because it's second nature to
> use a semicolen at the end of every statement -- even where it
> doesn't belong:
> 
>     if (a==b);
>         TheyAreEqual(); // Oops! Called when it shouldn't be!
> 
> We can't simply make the null statement illegal -- too much legacy
> code. But there are already alternatives today, so we can deprecate it.

Isn't this primarily a QoI thing? If your compiler issued a 
"Warning: if-statement misses controlled statement (extra ';' ?)"
would you still want the null-statement deprecated?

I commonly write

catch (Ex)
{ ; }

and I think it's clear what this does; I don't think this usage should
be deprecated.

Regards,
-- 
Michiel Salters

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



