Re: Multiple assignment

From: Duane Bozarth (dp_bozarth_at_swko.dot.net)
Date: 07/20/04


Date: Tue, 20 Jul 2004 16:46:50 -0500

Russ Holsclaw wrote:
>
> > I don't think it's overstating it at all--if anything I think it's
> > understating the level of abomination... :)
>
> >
> > I think much of C is a close approximation of an abomination, too. :)
> >
> > ...snip discourse on C assignments...
> >
> > I don't really have any argument there but my opinion is that using the
> > same operator for both equality and assignment simply leads to buggy
> > code that is hard to peruse.
>
> Well, abomination is in the eye of the beholder, I guess. I don't really
> disagree with you, but obviously I don't feel as strongly about it as you
> do.
>
> Strictly speaking, the "=", in the context of assignment, as in the "Let"
> statement (implied or explicit) and the "For" statement is not really being
> used as an operator, per se, but as a syntactic token ... a delimiter. In
> all other contexts, it's treated as an operator. I guess that's why I don't
> consider it to be the "abomination" that you do.

Strictly speaking, that's true (but I didn't know we were trying to be
pedantic here, I thought we were exagerating our opinions for the fun of
it... :) )

> In any case, it's part of the Basic language spec, not just Microsoft's
> extensions, so changing it at this point would be an abomination of another
> sort. ...

Yes, as many things as are MS-specific in VB, the "core" of the language
is pretty well based on BASIC, agreed.

My point still is that to use "=" in the two contexts is simply error
prone and difficult to catch visually if one does make the mistake.
I'll also grant that if one writes much BASIC, it's not a very likely
mistake, but then, mistakes <do> happen...

> C stems from some pretty old stuff, but it took a long time before it
> really emerged as a "mainstream" programming language. That didn't really
> happen to any great extent until sometime in the '80s. Speaking for myself,
> I wasn't aware of it until the late '70s at the earliest ...

I couldn't tell you when I first became aware of it any longer...I moved
from mainframe (CDC and/or Cray machines almost exclusively) to another
company and began robotics and smaller realtime systems in '78--I recall
some hardware drivers not too long after that although I couldn't tell
you the year any more within +/-3, probably. All the development was in
Forth at the time...

...

> But, I digress...

Interesting, as noted above I only ran some code (virtually all FORTRAN
IV) on IBM machines a very limited amount while in Oak Ridge--ORNL had
some IBMs but my heavy computing was at B&W on CDC and contracted time
on Crays before getting into the micros...



Relevant Pages

  • Re: I am amazed
    ... understand that just because one has the ABILITY to be an asshole, ... I'm just pointing out your mistake. ... Returning rude with rude is not enlightenment. ... You are entitled to YOUR opinion, ...
    (rec.arts.sf.tv)
  • Re: Cindy Sheehan has book signing - no one shows up
    ... >>> Your opinion and a $1 will get you a cup of coffee. ... Nobody with an ounce of intellect thinks the war was a "mistake" war. ...
    (alt.politics)
  • Re: victorious Brits
    ... >>>no i just see no point on picking up on a mistake when he obviously got ... its being picky and quite frankly stupid ... i air my opinion to who ever it is. ...
    (uk.sport.football.clubs.liverpool)
  • Re: Getting started with C : Tilde /Dash
    ... itself is no reason for criticism, as no developer can honestly say they ... haven't made the same mistake, ... lot of mistakes and quite a few were this sort of thing. ... you can only expect this sort of opinion to be formed. ...
    (comp.sys.acorn.programmer)