Article View: comp.lang.misc
Article #6320Other syntax issues (was: language commenting constructs)
From: Jim Giles
Date: Fri, 17 Mar 1989 01:53
Date: Fri, 17 Mar 1989 01:53
25 lines
1527 bytes
1527 bytes
From article <3452@ficc.uu.net>, by peter@ficc.uu.net (Peter da Silva):
> In article <39273@oliveb.olivetti.com>, chase@Ozona.orc.olivetti.com (David Chase) writes:
>> * :=/= instead of =/==
>
> But this definitely was.
>
I never liked ':=' for assignment. It has been claimed that it was selected
because it _looked_like_ a left pointing arrow. It doesn't, of course, look
anything like a left pointing arrow. If I'm to be forced to use two char-
acters for the assignment operator (and one of them shifted no less) I
would rather have '<-'. This, at least, really does look like a left arrow.
Frankly, I prefer =/== to :=/=. ':=' was only chosen in the early days
because some hardware didn't have '<' in the character set.
> Take your pick:
>
> min2(a,b) { return (a < b) ? a : b; }
> #define min2(a,b) (((a) < (b)) ? (a) : (b))
Obviously, I pick the first one since the second is not even correct!
If either of the arguments to the macro have side-effects, the macro
may return the wrong answer - and it will certainly perform at least
one of the side-effects too many times.
Technical Details
Message-ID:
<10582@lanl.gov>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!tank!mimsy!cvl!haven!adm!cmcl2!lanl!jlgReferences:
<3452@ficc.uu.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!tank!mimsy!cvl!haven!adm!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Other syntax issues (was: language commenting constructs) Message-ID: <10582@lanl.gov> Date: 17 Mar 89 01:53:12 GMT References: <3452@ficc.uu.net> Organization: Los Alamos National Laboratory Lines: 25