It may be contrived.
But it was not broken by C++'s or C99's // comments. In fact it compiles
great in C++ !
"int a = 2//**/1;" is treated is "int a = 2/ 1;" by pre-C99 C, and as "int
a = 2" by C99, C++, or Java. The most important thing for the question of
whether it *compiles* or not is actually the missing semicolon. Depending
on what follows, this may or may not be legal. It seems likely to me that
in most plausible contexts, it will result in a syntax error, so no, it
will not compile "great" in C++. On the other hand, there may be contexts
in which it will compile, but the meaning may be altered. It is possible
that in a few contexts it will compile without altered meaning as a gets
assigned 2 in both cases.
In the specific case that the line is followed by a lone ; it will compile
in both cases and assign a the value 2 in both cases, though this would be
equally contrived to the original example.
But it would break with your proposal.
There is no /* /* */ sequence in there, so no, it would not.
Neither would I. Among other things because it would not compile
with C++ or a C that has implemented at least that part of C99.
It will under some circumstances, including if the next line starts with a
semicolon. Empty statements are legal in C, so it would still compile
as C89 in that case as well.
More importantly, it will compile in C89 without the next line having to
start with a ; and C89 is still in widespread use.
But it is rather irrelevant.
Since it was not the example I gave.
Yes it was.
Your post said:
I gave a very example of a regular comment just placed at
a special location.
How else was I to interpret it?
You would gain more credibility in your argumentation, if you
read what you are replying to.
I bloody well DID read what I was replying to, you condescending ...
person. And it said
I gave a very example of a regular comment just placed at
a special location.
If that is not what you actually *meant*, then you should have written
something difference.
Sorry for losing patience like that mate, but I get frustrated when people
like you and Bent seem determined to make the worst of something, and
especially when you have the gall to accuse and insult me for what I
can only assume was your own failure to communicate clearly.
The only one losing credibility here is you, both because you are
apparently saying one thing and then claiming you said something else a
few posts later and because you are resorting to personal attacks and
calling others' honesty into question when someone continues to disagree
with you.
Not everyone who disagrees with you is an uneducated moron. Sometimes they
simply don't share your opinion and occasionally they are just plain
right, and you wrong.
It would be nice of you to give others the benefit of the doubt and not
start writing messages whose every pore oozes forth your opinion that
someone is an uneducated moron or, worse, a liar, just because you
disagree with them and they don't promptly change their opinions to match
yours. There ARE other reasons why someone might not do that, you know.
Assuming that we talk about what I wrote - not you invention - then you
never know.
What invention? That line of text is from
I gave a very example of a regular comment just placed at
a special location.
It is an odd number of quote-levels deep, you will notice, while my texts
are an even number of quote-levels deep, since this is one of my posts. So
it's quite clear that I did not invent that at all. And you quite clearly
implied that you did, in the last two lines of that excerpt.
I do hope I will not have to repeat that same excerpt a fourth time. If I
do, I may decide to follow it up with a big fat plonk. Reluctantly, to be
sure, since you unlike Bent have made numerous useful posts to this
newsgroup. But if you are going to act like a spoiled child as soon as
someone says "no" to you and won't change his mind, and worse insinuate
that he is a liar for doing so, then I don't care to read anything else
you might have to say. Sorry, mate, but that's the way it is.
It is often postponed for a long time, but eventually an upgrade often
happen.
Along with any needed code changes. That would not change, of course.
Someone considered it a useful feature.
And comments that nest properly could also be considered a useful feature.
A much more broadly applicable one, too. Instead of only in database
projects it might come in handy in all projects.
And as demonstrated here people are not happy about it breaking existing
builds.
It has not been done yet, and therefore has not broken any existing
builds. All I can see is that *two* people, you and Bent, are not happy
about the *prospect* of it breaking existing builds, which prospect's
allegedly-terrifying nature you have failed to support with much evidence.
The same two people show a tendency towards letting this disagreement
become personal, and a tendency towards insisting upon having the last
word, and several other rather questionable tendencies, though, so I don't
think their disagreement is indication of very much, save possibly that
whatever they are disagreeing with is likely to have some merit.
And this is a case of something that has always been like that. It is
not a new phenomenon.
No, it is not. A quick perusal of your posting histories using Google's
archive shows that both of you have a long and sordid history of getting
into online fisticuffs over similarly minor quibbles with a variety of
people over the past several years. Both of you, particularly, have the
un-admirable trait that when anyone holds an opinion that differs from
yours on any subject, you think them ill-educated and in error, and if,
once you have made some effort to educate them and teach them the error of
their ways, they persist in holding an opinoon that differs from yours,
you think them a fool or worse, and moreover loudly and publicly proclaim
this opinion. It is frankly surprising that you do not get in even more
fights, when that is considered.
Bent's posting history to cljp consists of little else but a series of
such fights, hence the ease with which I decided he wasn't worth my time.
You have had rather more useful posts in your history, but still with a
tendency towards this ... I don't know what to call it. Maybe arrogance or
narcissism. Maybe a simple inability to distinguish between facts, which
may be absolutely wrong or right, and opinions, which may differ from
yours and still not be incorrect. Truth be told, though, I think the both
of you are moderately to severely autistic, though at least in Bent's case
without the usual language deficits. Hypergraphia if anything in his case.
That neatly explains both the geeky areas of interest and the inability to
recognize that others' opinions may be valid even when they are dissimilar
to your own, and it explains other more minor things, quirks and in your
case poor language skills.
Yes, I suppose that constitutes a flame. Well, if you don't like it,
perhaps you should think twice next time before opening your trap and
calling some chap a liar like you did to me when you said my credibility
was damaged by what you alleged to be dishonest debating tactics on my
part, which tactics apparently consisted of my a) reading what the quoted
material said were the previous iterations in this exchange and b)
attributing to you what the quote-nesting levels, combined with your own
words, implied was yours. Shockingly dishonest, that.
Given how development of C and Java are progressing and how they are
used, then I would changes to java.sql way under adding nested comments
to C/C++.
Nonsense. There is enough Java code in production to bury the interior of
Australia miles deep in the stuff, and an awful lot of it deals with
databases. Maybe even "nearly all" of it, for some values of "nearly all".
Whereas there is a lot of C and C++ code with /* */ comments in it but
very little that relies on comments NOT nesting, that is, has /* /* */
somewhere in it.
Furthermore, what C and C++ code does do this could be fixed
literally in minutes with a syntax-highlighting IDE after the hypothetical
transition of a project to a compiler that nests comments, by people with
no knowledge of what the specific code is supposed to do, only that /* and
*/ should come in matched pairs now. A typical project might have five
lines that need changing out of millions.
An automated tool could do it even faster, by locating */s that terminate
comments under the old rules and would no longer do so under the new ones
and doubling them up, tripling them, or more as necessary so that the
comment terminations would remain at the same locations.
Yes, folks, this is such a horrible existing-code-breaking change that it
would take all of TEN MINUTES to update a massive code-base, for anyone
with a little knowledge of C, the C preprocessor's internals, and shell
and/or make. So, basically any C hacker worth his pay. Yes, a whopping TEN
MINUTES! My God, it's the end of the world!
Of course, implementing new methods that were added to an interface, while
adhering to the interface's contract complete with whatever semantics it
requires of those new methods, is much much worse, and certainly not
automatable in any reasonable manner. Auto-generating methods that return
null or throw UnsupportedOperationException is as close as you can get,
but will surely violate the contracts for the new methods, and will blow
up at run-time as soon as the code has to interoperate with code that
actually calls those methods.
// was added to C 10 years ago.
So?
If comment-nesting were adopted tomorrow, then on February 24, 2019 you
could say comment-nesting was added to C 10 years ago.
Software are not developed for fun but for money.
"A stitch in time saves nine" is not, contrary to popular belief,
a reference to saving golf strokes or something like that. It means saving
stitches, and in practise, it tends to mean saving money.
Oh, wait, that isn't popular belief after all. But apparently it is your
belief.
Something that must be fixed cost money.
Hence why updating the toolchain used with a major project is so
infrequent. Comment-nesting or no comment-nesting.
And the chance that it will be used as an opportunity to cleanup the
entire code is pretty small.
Unfortunately.
Fortunately, though, "pretty small" is greater than zero.