Article View: comp.lang.misc
Article #3888Re: Indirection
From: peter da silva
Date: Fri, 20 Nov 1992 18:14
Date: Fri, 20 Nov 1992 18:14
36 lines
2030 bytes
2030 bytes
In article <Bxyut0.Jo@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
> In article <id.GT2V.7OE@ferranti.com> peter@ferranti.com (peter da silva) writes:
> >Personally, I think that making indirection a prefix operator was a bigger
> >mistake than any of these.
> Certainly not from the standpoint of English speakers.
Hackercentrism you us of accuse you Anglocentrism of guilty are but.
IF YOU-WANT A-PROGRAMMING-LANGUAGE DESIGNED-FOR-ENGLISH YOU-KNOW
WHERE-TO-GET-IT.
MODIFY HERMAN-RUBIN TO PROCEED TO COBOL.
> As I understand it,
> *x in C denotes the object referred to by x, the object "found" AT x. Thus,
> @x would have been at least a somewhat logical notation, at least relatively
> easily understood by users, as well as easy for parsing, etc.
Yes, but it makes for extra silly syntax (postfix indirection obviates the
need for ->), and makes expressions that use other indirection operators
(which are all postfix: [] and ()) much more complex:
a = *((*f)()->baz[0]);
Instead of:
a = f@()@.baz[0]@;
or my preferred:
a = f^()^.baz[0]^;
I agree that C uses too many symbols, by the way. AND, OR, NOT, XOR, DIV,
and MOD make more sense in many ways. I would not want to use /\ and \/
unless you changed the escape character. I detest BEGIN and END.
--
Peter da Silva / 77487-5012 USA / +1 713 274 5180
true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
{dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
Technical Details
Message-ID:
<id.CU4V.1T2@ferranti.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peterReferences:
<Bxv2t2.4FH@mentor.cc.purdue.edu> <id.GT2V.7OE@ferranti.com> <Bxyut0.Jo@mentor.cc.purdue.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ferranti.com (peter da silva) Subject: Re: Indirection Message-ID: <id.CU4V.1T2@ferranti.com> Organization: Xenix Support, FICC References: <Bxv2t2.4FH@mentor.cc.purdue.edu> <id.GT2V.7OE@ferranti.com> <Bxyut0.Jo@mentor.cc.purdue.edu> Date: Fri, 20 Nov 1992 18:14:41 GMT Lines: 36