On 27/01/2011, at 12:12 AM, john skaller wrote: > > On 26/01/2011, at 12:46 PM, Erick Tryzelaar wrote: > >> On Tue, Jan 25, 2011 at 5:30 PM, john skaller >> <skal...@users.sourceforge.net> wrote: >>> I am thinking of introducing a new type to Felix: @t. This is a pointer to >>> a t. >>> Here's the rub: >>> >>> Apart from dereferencing, pointers in C have two extra properties: >>> they can be NULL, and they can be incremented. >> >> I like the idea of making people explicitly test for nulls, but I >> wonder if it'd make sense to push things even farther. Most new >> languages these days don't directly expose raw pointers. Does it make >> sense for us to do so, or could we get by without them? > > > A "pure" language might get away without them, but it would make > binding to C libraries rather tricky :)
FYI the real issue is variables. There's no sane definition of a variable other than a pointer. The Algol like languages, including C, have a bogus notion of "lvalue" which is a superior piece of crud. Anyone writing assembler knows a variable is an address. Using a variable (i.e. a pointer) in the RHS context to mean a value is really bad: you can see this screws C++ up completely. Two context dependent meanings of the same symbol is bad in C, but untenable completely in C++ because the concept of "lvalue context" can't be defined properly in C++. The only sustainable concept is pointer, because a pointer is a value. the thing is, an object pointer is quite safe. It's only NULL and array address calculations that is dangerous. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language