Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles; site uokvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!ihnp4!inuxc!pur-ee!uiucdcs!uokvax!jab
From: jab@uokvax.UUCP
Newsgroups: net.lang.c
Subject: Re: Register functions ?
Message-ID: <3000037@uokvax.UUCP>
Date: Sun, 23-Sep-84 23:33:00 EDT
Article-I.D.: uokvax.3000037
Posted: Sun Sep 23 23:33:00 1984
Date-Received: Thu, 27-Sep-84 06:09:32 EDT
References: <8836@watmath.UUCP>
Lines: 28
Nf-ID: #R:watmath:-883600:uokvax:3000037:000:1123
Nf-From: uokvax!jab    Sep 23 22:33:00 1984

/***** uokvax:net.lang.c / tikal!warren /  8:33 pm  Sep 21, 1984 */

	C would benefit from a new storage class, I hereby dub "private".
	Private storage items, whether const or variable, would be not
	exportable.  The "private" declaration is intended to get around
	the "aliasing" problem in C, where two expressions (say, "x" and
	"*y") cannot be assumed to point at different objects (they could
	both point to the same place).   If x is declared "private", then
	y must point somewhere else.

/* ---------- */

"must point somewhere else"?

The idea of a "PRIVATE/LOCAL" variable is nifty, and gets rid of
many "aliasing" problems, I'm sure. In a language such as "C", in
which a pointer can contain ANY valid address (where "valid" refers
to "hardware address space" and not "external variable") you
won't get what you really want.

I suspect that the way to get that might be to change a pointer to be type-
specific, and for locations to contain "datum" and "type information on that
datum", with checks performed by the hardware. Anyone want to venture to guess
what the overhead would be?

	Jeff Bowles
	Lisle, IL