C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: expliciting data-links: a feature for enhancing program

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Ken Hagan
Guest





PostPosted: Mon Jul 07, 2003 5:57 pm    Post subject: Re: expliciting data-links: a feature for enhancing program Reply with quote




<danielgutson (AT) hotmail (DOT) com> wrote...
Quote:

Yes, you are absolutely right, but, remember the in order to invoke
your functions:

[snip]

the caller has still to receive the explicit-declared variable:

void caller(myGlobalData)
{
int x = GetSubtleData(myGlobalData);
}

Then I've misunderstood your proposal, and it looks like marking
a variable "explicit" prevents anyone from even indirectly using
it without naming the variable. I can't imagine ever wanting to
mark a variable explicit under these rules.

I also don't see how such variables can be accessed, since they
can only be mentioned by procedures that were "given" them by
their caller. Where does this "bottom out"? How do we get to
mention the variable in the first place?

Either you can use such variables without your caller knowing
or you can't. The first lets you hide the fact and the second
makes them unusable. No?


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


Back to top
KIM Seungbeom
Guest





PostPosted: Wed Jul 09, 2003 6:41 pm    Post subject: Re: expliciting data-links: a feature for enhancing program Reply with quote



[email]danielgutson (AT) hotmail (DOT) com[/email] (danielgutson (AT) hotmail (DOT) com) wrote in message news:<23478c42.0306291819.57515c8b (AT) posting (DOT) google.com>...
Quote:

PROBLEM - Face B:
[...]
PROPOSED SOLUTION:
´explicit´ parameter variable modifier
The above could be written as

int f(explicit myGlobalData);

says "I´m a honest function: I´m advising you that I´ll use the global
variable".

Implicances:
1 - the caller is obbligged to pass THAT variable, no matter of its
type.
2 - it will not occupy stack space. (similar to implicance A.3)
3 - signatures are different (refer to implicance A.4)

It would be very confusing to have in the parameter list what does
not occupy the stack space nor have to be passed by the callers.
I'd rather write it like this:

int f() explicit(myGlobalData);

--
KIM Seungbeom <musiphil (AT) bawi (DOT) org>

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


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.