Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!batata.huji.ac.il!amoss From: amoss@batata.huji.ac.il (amos shapira) Newsgroups: comp.lang.c Subject: Re: New assignment operator ->= ? Message-ID: <649@shuldig.Huji.Ac.IL> Date: 17 Feb 90 00:29:48 GMT References: <24707@ut-emx.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Lines: 31 mayoff@walt.cc.utexas.edu (Rob "The" Mayoff) writes: >Well, what about ->? In tracing linked lists, I often do something like: > p = head; > while (*p->next) > p = p->next; >to get to the end, or something similar. So why not > p = head; > while (*p->next) > p ->= next; Well, I though just about such an operator and from the same reasons. But, as far as I understand compilers, using such an operator will not gain much code savings, if at all. On the other hand it MIGHT be more readable in several places (especially when updating a pointer who's address is given inside another structure (like a->b->c ->= next;) but then, how meny times do you write such a code? >Anyone else agree? I think I will use this operator here and there if it will become a standard. > __ >/\_\ Rob Mayoff >\/_/ mayoff@ccwf.cc.utexas.edu - Amos Shapira amoss@batata.bitnet amoss@batata.huji.ac.il