Ben Bacarisse said:
It has nothing to do with "speaking standard". You can't program in C
without knowing the difference. There are huge differences between
I have done for years. Well, understanding what people mean and not
being anal about it.
what can be done in an assignment and what is permitted in an
initialisation. It is not even limited to C. Lots of languages have
this distinction though some, helpfully, have more distinctive syntax.
While these exatra distinctions help, the issue is hardly obscure in C
-- you very soon learn the syntactic difference between a statement
and a declaration.
Many professional programmers never, ever learn the CORRECT terminology
since its, well, not required to be a good programmer. One knows what
one means. I dont expect many people to agree with me.
The only worlds in which it is an assignment are imaginary ones. Yes,
No. I am assigning one to the variable. Sorry and all that. You can
call it initialise if you want.
there are lots of people who don't know the difference, and are
probably constantly baffled by error messages (that talk about
No. More baffled by people who refuse to "understand" the obvious and
hide behind vocabulary to remain "confused".
assignments in some cases and initialisations in others) and who can't
work out why some things seem OK in one place and not in another, but
they are simply ill-informed, not living in a world that is any more
real than the one I inhabit.
You seem to miss the point.
int b = 1;
It IS common vocabulary to say "Assign 1 to b".
Hence my reply about choosing language carefully when talking to people
like Bill.
It made it sound like you could not initialise a variable outside a
function. The fact is you can. The FACT is that (in my experience) MOST
people would still say we "assign 1 to b" in this case.
Clearly one can not assign a recently modified variable to b later on
outside the scope of a function since the execution path does not allow
that you are ONLY in the scope of functions.
We won't agree. Call me unprofessional, dense, etc etc if you want. But
I know what someone means when they say "assign 1 to be" in the
global/module scope. I dont feign confusion.