At present
struct X { py: &Y; };
struct Y { a : int; };
px = new X (new Y);
println$ px . py . a;
Well why not:
println$ px . a;
? When Felix sees a pointer to struct T followed by . and a name a,
it looks up a in the struct T, and emits
(*px) . a;
i.e. it automatically derefs the pointer .. since pointers don't
have members there's no confusion unless you meant reverse
application of course, which might work too, i.e. try
a px
and if that fails and ps is a pointer, try
a (*px)
The suggestion above is an extension: if 'a' isn't found in X,
look in every component for it, and if you find it in exactly
one, use that one.
Auto dereference should already be recursive:
ppx := &px;
ppx . py
should already work.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language