🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #267

Re: foo() => foo

#267
From: Scott Amspoker
Date: Fri, 03 Aug 1990 15:33
33 lines
1738 bytes
In article <26717@pasteur.Berkeley.EDU> krste@ICSI.Berkeley.EDU ( Krste Asanovic) writes:
>Suggestion: If a function can be called with no arguments, then it
>should be possible to call it without using the superfluous empty
>parenthesis. E.g.
>
>[some of example deleted]
>
>    b = a.value;
>    b = a.value(); // Still legal of course.
>
>It would appear that this would be a fairly minor change. It is
>illegal to declare a variable and function with the same name in the
>same scope, so there should be no ambiguity (or am I missing something
>subtle in the parser?). This allows the user to ignore whether a data
>member like object is implemented as a data member or as a member
>function.  It also saves a lot of ugly parens in code such as:

I believe Objective C allows this as does Pascal.  It is a nice
feature but I don't see it as a minor change.  How does one take
the address of a function?
 
       function_pointer = &funcname

Some parsing methods could easily choke on this.  Is *is* consistent
with the notion of "hiding" implementation details of an object
class from the programmer (who should not need to know whether a
particular member is data or a function).

-- 
Scott Amspoker
Basis International, Albuquerque, NM
(505) 345-5232
unmvax.cs.unm.edu!bbx!bbxsda!scott
Technical Details
Message-ID: <925@bbxsda.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!maverick.ksu.ksu.edu!unmvax!bbx!bbxsda!scott
References: <26717@pasteur.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!maverick.ksu.ksu.edu!unmvax!bbx!bbxsda!scott
From: scott@bbxsda.UUCP (Scott Amspoker)
Newsgroups: comp.std.c++
Subject: Re: foo() => foo
Keywords: function call syntax
Message-ID: <925@bbxsda.UUCP>
Date: 3 Aug 90 15:33:45 GMT
References: <26717@pasteur.Berkeley.EDU>
Reply-To: scott@bbxsda.UUCP (Scott Amspoker)
Organization: Basis International,  Albuquerque, NM
Lines: 33