From -5528235227702143202
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,4441c5f6d7843223
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-08-22 16:44:03 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Francis Glassborow <francis.glassborow@ntlworld.com>
Newsgroups: comp.std.c++
Subject: Re: C++0x Wish List (explicit class)
Date: Thu, 22 Aug 2002 23:43:48 GMT
Organization: Southfield Microcomputer SS
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <vhGu8zAcrVZ9EwzA@robinton.demon.co.uk>
References: <3D48C729.40503@spamnot.codeweavers.com>
 <ehdlkuo9gkcu69b6og2aup9o63knu7tpra@4ax.com>
 <8c8b368d.0208060921.43e9e9d5@posting.google.com> <aiphem$9e5$1@acs2.byu.edu>
 <3D589892.3050008@spamnot.codeweavers.com>
 <8c8b368d.0208150528.2bc34601@posting.google.com> <ajjk97$3pb$1@acs2.byu.edu>
 <8c8b368d.0208220503.1c974370@posting.google.com> <ak3eve$4n1$1@acs2.byu.edu>
Reply-To: Francis Glassborow <francisG@robinton.demon.co.uk>
X-Trace: mail2news.demon.co.uk 1030059832 mail2news:21893 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
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)
Delivered-To: std-c++@ncar.ucar.edu
MIME-Version: 1.0
Content-Type: text/plain;charset=us-ascii;format=flowed
User-Agent: Turnpike/6.01-U (<TilyaeicE$WmMOP9F8P4$y3lmP>)
X-MailScanner: PASSED (v1.2.5 41351 g7MLhdDE041231 mailbox3.ucsd.edu)
Lines: 40
Xref: archiver1.google.com comp.std.c++:13349

In article <ak3eve$4n1$1@acs2.byu.edu>, Adam H. Peterson 
<ahp6@email.byu.edu> writes
>Well, I personally didn't learn about the keyword "explicit" until I had
>been programming for years, and then not from a language class, but from
>reading documentation about C++.  If you think explaining explicit class in
>terms of the other use of explicit, you'll have to explain the other use of
>explicit, along with all the strange rules involving compiler conversions
>(such as ambiguity and the one-conversion rule).  Personally, I would rather
>have seen all constructors explicit unless marked "implicit", but we have to
>work with what we have now.  Anyway, see below for the continuation of this
>point.

It was a relatively late introduction to the language and was introduced 
exactly because many of us got very tired of having to teach one of 
several horrible hacks in order to provide non-converting constructors. 
Of course many authors and lecturers take for ever to catch up even 
after compiler implementors have done so.

Of course it should have been the other way round (single argument ctors 
should not have been conversion operators by default) but it was way too 
late to do that by the time we woke up to just how rotten the techniques 
we had were. Note that the proposed new use for explicit is again to 
prevent having to use hacks to turn off a feature when we do not want 
it. If compiler implementors tell me that this proposal would cause 
problems in parsing etc. I will listen, but if it does not, and as it 
will not break a line of existing code I would strongly favour going 
ahead.

-- 
Francis Glassborow      ACCU
64 Southfield Rd
Oxford OX4 1PA          +44(0)1865 246490
All opinions are mine and do not represent those of any organisation

---
[ 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                       ]



