Re: Multiple assignment
From: Duane Bozarth (dp_bozarth_at_swko.dot.net)
Date: 07/20/04
- Next message: Duane Bozarth: "Re: $"
- Previous message: Karl E. Peterson: "Re: $"
- In reply to: Russ Holsclaw: "Re: Multiple assignment"
- Next in thread: Duane Bozarth: "Re: Multiple assignment"
- Messages sorted by: [ date ] [ thread ]
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...
- Next message: Duane Bozarth: "Re: $"
- Previous message: Karl E. Peterson: "Re: $"
- In reply to: Russ Holsclaw: "Re: Multiple assignment"
- Next in thread: Duane Bozarth: "Re: Multiple assignment"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|