"Peter Duniho" <NpOeStPeAdM@NnOwSlPiAnMk.comwrote in message
news:13emnhkp6r4el73@corp.supernews.com...
Quote:
Doug Semler wrote:
Quote:
>[...]
>Finalizer, destructor....Tomat-oh, Tom-ah-toe. In C#, the semantics
>what the function does is completely different than in C++. And that is
>what is not "the same"
>
And the post to which I replied read "It means destructor (the same as
C++)". The word "means" implies "semantics", whether that was intended or
not. That's what semantics is...the _meaning_.
>
I don't see how any reasonable interpretation infers "syntax" from the
word "means". I talk about "syntax" when I'm discussion how things are
written, and "semantics" when I'm discussion what those things mean.
>
But regardless, it's very important to understand that a finalizer isn't a
destructor. It's such an important difference, they even changed the name
to make that more clear.
>
Pete
Pete,
I was talking syntax in terms of the original statement. This is the
problem with the English language. Here's two completely different
interpretations of "It [the ~] means destructor (the same as C++)":
1) As in the C++ language, the ~ character in front of the name makes that
the function is a destructor.
2) The ~ character in front of the function name makes the function act as a
destructor as in the a c++ language.
See how the syntax changes the semantics? In statement 1, the modification
is on the ~ character. In statement 2, the modification is on the word
"destructor". Which one is correct in terms of C#? Semantics and syntax
cannot be divorced from each other. (Which is probably why I like
programming languages better than natural languages)
--
Doug Semler, MCPD
a.a. #705, BAAWA. EAC Guardian of the Horn of the IPU (pbuhh).
The answer is 42; DNRC o-
Gur Hfrarg unf orpbzr fb shyy bs penc gurfr qnlf, abbar rira
erpbtavmrf fvzcyr guvatf yvxr ebg13 nalzber. Fnq, vfa'g vg?