Article View: comp.std.c++
Article #1857Re: Equivalence of A and A<>
From: James M. Curran
Date: Mon, 28 Aug 1995 17:22
Date: Mon, 28 Aug 1995 17:22
21 lines
1502 bytes
1502 bytes
>> If I had the choice of re-designing the language, I would >> have disallowed the bare function name to be used as a >> pointer to the function and allowed the calls to functions >> without (). I wouldn't.. At least not the second part (I agree with the first part). While a compiler would have little trouble figuring out: int myfunc(void), x; x = myfunc; to a programmer, that still looks like assignment to two simple variables, and there's no point making the language anymore difficult to read. The otherwise superflous "()" at the end is a nice visual cue that "Hey -- we're calling a function here.." Further, I also have no problem requiring the "&" if you wanted to take the address of a function. [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<41stnb$qs3$3@mhafm.production.compuserve.com>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamageReferences:
<MATT.95Aug24145052@physics2.Berkeley.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage From: "James M. Curran" <72261.655@CompuServe.COM> Newsgroups: comp.std.c++ Subject: Re: Equivalence of A and A<> Date: 28 Aug 1995 17:22:22 GMT Organization: CompuServe, Inc. (1-800-689-0736) Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <41stnb$qs3$3@mhafm.production.compuserve.com> References: <MATT.95Aug24145052@physics2.Berkeley.EDU> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text Content-Length: 737 X-Lines: 17 Originator: clamage@taumet