|Language design question email@example.com (2000-02-13)|
|Re: Language design question firstname.lastname@example.org (Chris F Clark) (2000-02-13)|
|Automatic dereference operator: (Was: Language design question) email@example.com (Ira D. Baxter) (2000-02-13)|
|Re: Language design question firstname.lastname@example.org (James Jones) (2000-02-15)|
|Re: Language design question email@example.com (2000-02-15)|
|Re: Language design question firstname.lastname@example.org (2000-02-16)|
|Re: Language design question email@example.com (Joachim Durchholz) (2000-02-16)|
|[7 later articles]|
|From:||firstname.lastname@example.org (Shaun Flisakowski)|
|Date:||13 Feb 2000 20:15:23 -0500|
|Organization:||U of Wisconsin CS Dept|
|Keywords:||design, question, comment|
I'm working on a language design that is a hybrid of C and pascal.
It seems that with strong typing, there is no need for a dereferencing
operator, as the compiler could add these automatically. (I'd still
have an address-of operator)
type TRec = struct
var p: pointer to pointer to pointer to TRec;
var r: pointer to TRec;
p = r; // Ok, equiv to: **p = r
r = p; // Ok, equiv to r = **p
p = nil; // Error, ambigious
p = nil as pointer to pointer to TRec; // Ok
r = nil; // Ok, unambigious
p.a = 5;
r.a = 7;
Does anyone see any problem with this that I'm overlooking?
Are there any existing langues that handle this similarly?
Shaun Flisakowski flisakow AT spf-15.com
http://www.spf-15.com - Windows Games, and Unix Freeware.
[This sounds a lot like Algol 68 coercion. -John]
Return to the
Search the comp.compilers archives again.