Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uiucdcsb.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!mhuxj!houxm!ihnp4!inuxc!pur-ee!uiucdcsb!wsmith
From: wsmith@uiucdcsb.UUCP
Newsgroups: net.lang
Subject: Alternative Structures
Message-ID: <8900018@uiucdcsb.UUCP>
Date: Sat, 15-Dec-84 23:05:00 EST
Article-I.D.: uiucdcsb.8900018
Posted: Sat Dec 15 23:05:00 1984
Date-Received: Mon, 17-Dec-84 04:11:45 EST
Lines: 33
Nf-ID: #N:uiucdcsb:8900018:000:1272
Nf-From: uiucdcsb!wsmith    Dec 15 22:05:00 1984


Ordinary languages like C, Pascal, etc...  either make no restrictions
on case of letters in identifiers, make both cases be the same, or they 
require you to use only one case.  

Is there any reason that case can not be used to contain semantic
information?

For example, all identifiers would have to begin with an upper case letter
and the rest of the identifier would be lower case.  The language could then 
define lowercase prefixes that determine different types so you would use pFoo 
for a pointer to a structure named Foo.  (typedef struct Foo *pFoo;)

If Foo had a field of type pFoo that was named Down, (pFoo Down;)
then with these conventions to reference the fourth element from beginning
the varable List (struct Foo *List) and assign the second element to point to 
it, this would suffice
		pListDown = pListDownDownDown;
or equivalently in C
		List->Down = List->Down->Down->Down;
The p prefix is needed to indicate that the pointers are to be assigned and
not the structures themselves.

An alternative notation is
		pList.Down = pList.Down.Down.Down;
with . also being used as the separator for normal field references.

I am interested in peoples reactions to either of these conventions as opposed 
to C's

Bill Smith
(ihnp4|pur-ee)!uiucdcs!wsmith